Rename platform_atmel_d21_*.[ch] to samd_*.[ch].
11 files changed, 17 insertions(+), 51 deletions(-)

R platform_atmel_d21.c => 
M platform_atmel_d21_clocks.c => samd_clocks.c
M platform_atmel_d21_clocks.h => samd_clocks.h
M platform_atmel_d21_i2c.c => samd_i2c.c
M platform_atmel_d21_i2c.h => samd_i2c.h
M platform_atmel_d21_sercom.c => samd_sercom.c
M platform_atmel_d21_sercom.h => samd_sercom.h
M platform_atmel_d21_spi.c => samd_spi.c
M platform_atmel_d21_spi.h => samd_spi.h
M platform_atmel_d21_uart.c => samd_uart.c
M platform_atmel_d21_uart.h => samd_uart.h
R platform_atmel_d21.c =>  +0 -24
@@ 1,24 0,0 @@ 
-/* Peripheral Library for Atmel SAMD20 and SAMD21
- *
- * Permissive open source ISC license.
- *
- * Copyright (c) 2015 Tero Koskinen <tero.koskinen@iki.fi>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#include <sam.h>
-
-#include <stdint.h>
-

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

          
M platform_atmel_d21_clocks.h => samd_clocks.h +1 -4
@@ 18,8 18,7 @@ 
  *
  */
 
-#ifndef PLATFORM_ATMEL_D21_CLOCKS_H
-#define PLATFORM_ATMEL_D21_CLOCKS_H
+#pragma once
 
 #include <stdbool.h>
 #include <stdint.h>

          
@@ 28,5 27,3 @@ 
 
 CTL_STATUS_t sercom_init_clocks(uint8_t sercom_no, bool use_dfll48);
 CTL_STATUS_t sercom_disable_clock(uint8_t sercom_no);
-
-#endif /* PLATFORM_ATMEL_D21_CLOCKS_H */
  No newline at end of file

          
M platform_atmel_d21_i2c.c => samd_i2c.c +2 -2
@@ 25,8 25,8 @@ 
 #include "libdevice/ctl_i2c.h"
 #include "libtools/ctl_tools.h"
 
-#include "platform_atmel_d21_clocks.h"
-#include "platform_atmel_d21_sercom.h"
+#include "samd_clocks.h"
+#include "samd_sercom.h"
 
 #include "d2x_gpio.h"
 

          
M platform_atmel_d21_i2c.h => samd_i2c.h +1 -3
@@ 18,8 18,7 @@ 
  *
  */
 
-#ifndef PLATFORM_ATMEL_D21_I2C_H
-#define PLATFORM_ATMEL_D21_I2C_H
+#pragma once
 
 #include <stdint.h>
 

          
@@ 38,4 37,3 @@ d21_configure_i2c_bus(uint8_t bus, unsig
 CTL_STATUS_t
 d21_i2c_shutdown_master(uint8_t sercom_no);
 
-#endif /* PLATFORM_ATMEL_D21_I2C_H */
  No newline at end of file

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

          
M platform_atmel_d21_sercom.h => samd_sercom.h +1 -4
@@ 18,8 18,7 @@ 
  *
  */
 
-#ifndef PLATFORM_ATMEL_D21_SERCOM_H
-#define PLATFORM_ATMEL_D21_SERCOM_H
+#pragma once
 
 #include "libtools/ctl_tools.h"
 

          
@@ 29,5 28,3 @@ CTL_STATUS_t sercom_register_int_handler
 CTL_STATUS_t sercom_forget_int_handler(uint8_t sercom_no);
 CTL_STATUS_t sercom_enable_interrupt(uint8_t sercom_no);
 CTL_STATUS_t sercom_disable_interrupt(uint8_t sercom_no);
-
-#endif /* PLATFORM_ATMEL_D21_SERCOM_H */
  No newline at end of file

          
M platform_atmel_d21_spi.c => samd_spi.c +3 -3
@@ 29,9 29,9 @@ 
 #include "libdevice/ctl_spi.h"
 #include "libtools/ctl_tools.h"
 
-#include "platform_atmel_d21_clocks.h"
-#include "platform_atmel_d21_sercom.h"
-#include "platform_atmel_d21_spi.h"
+#include "samd_clocks.h"
+#include "samd_sercom.h"
+#include "samd_spi.h"
 
 #include "d2x_gpio.h"
 #include "pin_mapping.h"

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

          
@@ 63,4 62,4 @@ d21_spi_disable(uint8_t sercom_no, bool 
 CTL_STATUS_t
 d21_spi_select(uint8_t index, bool status);
 
-#endif /* PLATFORM_ATMEL_D21_SPI_H */
+

          
M platform_atmel_d21_uart.c => samd_uart.c +3 -3
@@ 26,9 26,9 @@ 
 
 #include "d2x_common.h"
 #include "d2x_gpio.h"
-#include "platform_atmel_d21_uart.h"
-#include "platform_atmel_d21_sercom.h"
-#include "platform_atmel_d21_clocks.h"
+#include "samd_uart.h"
+#include "samd_sercom.h"
+#include "samd_clocks.h"
 
 #define F_REF_8M_INTERNAL (8000000UL)
 #define F_REF_DFLL48M    (48000000UL)

          
M platform_atmel_d21_uart.h => samd_uart.h +2 -3
@@ 18,8 18,7 @@ 
  *
  */
 
-#ifndef PLATFORM_ATMEL_D21_UART_H
-#define PLATFORM_ATMEL_D21_UART_H
+#pragma once
 
 #include "libdevice/ctl_uart.h"
 

          
@@ 50,4 49,4 @@ d21_uart_set_pin_config(const struct UAR
 
 CTL_UART_t* d21_uart(uint8_t index);
 
-#endif /* PLATFORM_ATMEL_D21_UART_H */
+