M platform_samd_adc.c +2 -2
@@ 22,7 22,7 @@ 
 #include <ctl_api.h>
 #include <sam.h>
 
-#include "samd_adc.h"
+#include "platform_samd_adc.h"
 
 static CTL_EVENT_SET_t adc_events;
 

          
@@ 155,4 155,4 @@ void ADC_Handler(void)
     ctl_events_set_clear(&adc_events, MEASUREMENT_DONE_EVENT, 0);
   }
   ctl_exit_isr();
-}
  No newline at end of file
+}

          
M platform_samd_adc.h +1 -3
@@ 18,8 18,7 @@ 
  *
  */
 
-#ifndef D2X_ADC_H
-#define D2X_ADC_H
+#pragma once
 
 #include <stdint.h>
 

          
@@ 36,4 35,3 @@ uint32_t samd_adc_read_polled(uint8_t ad
  */
 int samd_adc_set_resolution(uint16_t res);
 
-#endif /* D2X_ADC_H */
  No newline at end of file

          
M platform_samd_clocks.c +2 -2
@@ 22,7 22,7 @@ 
 
 #include "libtools/ctl_tools.h"
 
-#include "samd_clocks.h"
+#include "platform_samd_clocks.h"
 
 CTL_STATUS_t sercom_init_clocks(uint8_t sercom_no, bool use_dfll48)
 {

          
@@ 166,4 166,4 @@ CTL_STATUS_t sercom_disable_clock(uint8_
   PM->APBCMASK.reg &= ~apb_mask;
 
   return CTL_NO_ERROR;
-}
  No newline at end of file
+}

          
M platform_samd_devinfo.c +2 -2
@@ 23,8 23,8 @@ 
 #include <stddef.h>
 #include <sam.h>
 
-#include "samd_common.h"
-#include "samd_devinfo.h"
+#include "platform_samd_common.h"
+#include "platform_samd_devinfo.h"
 
 static const uint32_t bootloader_size_mapping[] =
   {

          
M platform_samd_eic.c +3 -3
@@ 23,8 23,8 @@ 
 #include <sam.h>
 #include <ctl_api.h>
 #include <stdbool.h>
-#include "samd_common.h"
-#include "samd_eic.h"
+#include "platform_samd_common.h"
+#include "platform_samd_eic.h"
 
 struct interrupt_pair
 {

          
@@ 229,4 229,4 @@ void EIC_Handler(void)
     current = current << 1;
   }
   ctl_exit_isr();
-}
  No newline at end of file
+}

          
M platform_samd_eic.h +1 -3
@@ 18,8 18,7 @@ 
  *
  */
 
-#ifndef D2X_EIC_H
-#define D2X_EIC_H
+#pragma once
 
 #include <stdint.h>
 #include <stdbool.h>

          
@@ 46,4 45,3 @@ int samd_eic_disable(void);
 int samd_eic_enable_int(uint8_t int_no, bool filter, enum EIC_Pin_Sense sense, eic_callback_fn fn, void *user_data);
 int samd_eic_disable_int(uint8_t int_no);
 
-#endif /* D2X_EIC_H */

          
M platform_samd_gpio.c +3 -3
@@ 19,8 19,8 @@ 
  */
 #include <sam.h>
 
-#include "samd_common.h"
-#include "samd_gpio.h"
+#include "platform_samd_common.h"
+#include "platform_samd_gpio.h"
 
 int gpio_set_input(enum SAMD2X_PORT port, uint32_t pin)
 {

          
@@ 90,4 90,4 @@ bool gpio_get_state(enum SAMD2X_PORT por
 void gpio_toggle(enum SAMD2X_PORT port, uint32_t pin)
 {
   PORT->Group[port].OUTTGL.reg = (1 << pin);
-}
  No newline at end of file
+}

          
M platform_samd_gpio.h +1 -3
@@ 17,8 17,7 @@ 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  */
-#ifndef D2X_GPIO_H
-#define D2X_GPIO_H
+#pragma once
 
 #include <stdbool.h>
 #include <stdint.h>

          
@@ 46,4 45,3 @@ void gpio_toggle(enum SAMD2X_PORT port, 
 
 #define gpio_fast_toggle(port,pin) PORT_IOBUS->Group[port].OUTTGL.reg = (1 << pin)
 
-#endif /* D2X_GPIO_H */

          
M platform_samd_i2c.c +3 -3
@@ 25,10 25,10 @@ 
 #include "libdevice/ctl_i2c.h"
 #include "libtools/ctl_tools.h"
 
-#include "samd_clocks.h"
-#include "samd_sercom.h"
+#include "platform_samd_clocks.h"
+#include "platform_samd_sercom.h"
 
-#include "samd_gpio.h"
+#include "platform_samd_gpio.h"
 
 /* Default internal oscillator speeds */
 #define I2C_REF_SPEED SystemCoreClock

          
M platform_samd_nvm.c +4 -4
@@ 21,9 21,9 @@ 
 #include <debugio.h>
 #include <sam.h>
 
-#include "samd_common.h"
-#include "samd_nvm.h"
-#include "samd_devinfo.h"
+#include "platform_samd_common.h"
+#include "platform_samd_nvm.h"
+#include "platform_samd_devinfo.h"
 
 static volatile uint16_t *nvm = ((volatile uint16_t *)FLASH_ADDR);
 static uint32_t eeprom_start = 0;

          
@@ 186,4 186,4 @@ int samd_nvm_update_aux(uint8_t bootfuse
   }
 
   return status;
-}
  No newline at end of file
+}

          
M platform_samd_nvm.h +2 -4
@@ 18,10 18,9 @@ 
  *
  */
 
-#ifndef D2X_NVM_H
-#define D2X_NVM_H
+#pragma once
 
-#include "samd_common.h"
+#include "platform_samd_common.h"
 
 /*
  * flash organization:

          
@@ 42,4 41,3 @@ int samd_eeprom_read(uint32_t row_positi
 
 int samd_nvm_update_aux(uint8_t bootfuse, uint8_t eeprom_fuse);
 
-#endif /* D2X_NVM_H */
  No newline at end of file

          
M platform_samd_rtc.c +1 -1
@@ 25,7 25,7 @@ 
 
 #include "numeric_utils.h"
 
-#include "samd_rtc.h"
+#include "platform_samd_rtc.h"
 
 static rtc_handler_fn callback_fn;
 

          
M platform_samd_sercom.c +1 -1
@@ 23,7 23,7 @@ 
 #include <sam.h>
 
 #include "libtools/ctl_tools.h"
-#include "samd_sercom.h"
+#include "platform_samd_sercom.h"
 
 #define SERCOM_AMOUNT 6
 

          
M platform_samd_sleep.h +1 -3
@@ 39,8 39,7 @@ 
  *
  * \asf_license_stop
  */
-#ifndef D2X_SLEEP_H
-#define D2X_SLEEP_H
+#pragma once
 
 enum system_sleepmode { SYSTEM_SLEEPMODE_IDLE_0 = 0, SYSTEM_SLEEPMODE_IDLE_1 = 1, SYSTEM_SLEEPMODE_IDLE_2 = 2, SYSTEM_SLEEPMODE_STANDBY };
 

          
@@ 67,4 66,3 @@ static inline int system_set_sleepmode(
   return 0;
 }
 
-#endif /* D2X_SLEEP_H */
  No newline at end of file

          
M platform_samd_spi.c +4 -4
@@ 29,11 29,11 @@ 
 #include "libdevice/ctl_spi.h"
 #include "libtools/ctl_tools.h"
 
-#include "samd_clocks.h"
-#include "samd_sercom.h"
-#include "samd_spi.h"
+#include "platform_samd_clocks.h"
+#include "platform_samd_sercom.h"
+#include "platform_samd_spi.h"
 
-#include "samd_gpio.h"
+#include "platform_samd_gpio.h"
 #include "pin_mapping.h"
 
 enum transfer_state { TRANSFER_DONE_STATE, SPI_SEND_WAIT_DRE_STATE, SPI_SEND_STATE, SPI_RECEIVE_STATE, SPI_UNKNOWN_STATE };

          
M platform_samd_tc.c +2 -4
@@ 24,10 24,8 @@ 
 
 #include <sam.h>
 
-#include "samd_tc.h"
-#include "samd_gpio.h"
-
-#include <sam.h>
+#include "platform_samd_tc.h"
+#include "platform_samd_gpio.h"
 
 struct Timer_Settings
 {

          
M platform_samd_tc.h +1 -3
@@ 18,8 18,7 @@ 
  *
  */
 
-#ifndef D2X_TC_H
-#define D2X_TC_H
+#pragma once
 
 #include <stdint.h>
 #include <stdbool.h>

          
@@ 64,4 63,3 @@ void samd_tc_set_pin_config(const struct
 
 uint16_t samd_tc_get_16b_count(uint8_t timer_no);
 
-#endif /* D2X_TC_H */
  No newline at end of file

          
M platform_samd_tickless_idle.c +3 -3
@@ 23,9 23,9 @@ 
 
 #include <sam.h>
 
-#include "samd_tc.h"
-#include "samd_sleep.h"
-#include "samd_gpio.h"
+#include "platform_samd_tc.h"
+#include "platform_samd_sleep.h"
+#include "platform_samd_gpio.h"
 
 #define ONE_MS (SystemCoreClock / 1000)
 #define TEN_MS (SystemCoreClock / 1000 * 10)

          
M platform_samd_wdt.c +1 -1
@@ 22,7 22,7 @@ 
 
 #include <ctl_api.h>
 
-#include "samd_wdt.h"
+#include "platform_samd_wdt.h"
 
 static early_warn_fn ew_fn = NULL;
 

          
M platform_samd_wdt.h +1 -3
@@ 18,8 18,7 @@ 
  *
  */
 
-#ifndef D2X_WDT_H
-#define D2X_WDT_H
+#pragma once
 
 #include <stddef.h>
 #include <stdbool.h>

          
@@ 37,4 36,3 @@ void samd_wdt_enable(bool window_mode, u
 void samd_wdt_enable_2(void);
 void samd_wdt_disable(void);
 
-#endif /* D2X_WDT_H */