diff options
| author | Dan Halbert <halbert@halwitz.org> | 2017-08-25 22:17:07 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2017-08-25 22:17:07 -0400 |
| commit | ef61b5ecb59e9b4e37e3e3c023c62d583c23eb16 (patch) | |
| tree | 45a798fbed0dc673304597b29e0b60174195ce79 /atmel-samd | |
| parent | 266be307770abe11c220eb493388807920914b7a (diff) | |
| parent | 1f78e7a43130acfa4bedf16c1007a1b0f37c75c3 (diff) | |
Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master.
cpx build compiles and loads and works in repl; test suite not run yet
esp8266 not tested yet
Diffstat (limited to 'atmel-samd')
33 files changed, 151 insertions, 101 deletions
diff --git a/atmel-samd/Makefile b/atmel-samd/Makefile index 5476a91e9..459f2827f 100644 --- a/atmel-samd/Makefile +++ b/atmel-samd/Makefile @@ -227,13 +227,10 @@ SRC_C = \ lib/utils/interrupt_char.c \ lib/utils/pyexec.c \ lib/utils/stdout_helpers.c \ + lib/utils/sys_stdio_mphal.c \ lib/libc/string0.c \ lib/mp-readline/readline.c -STM_SRC_C = $(addprefix stmhal/,\ - pybstdio.c \ - ) - SRC_COMMON_HAL = \ analogio/__init__.c \ analogio/AnalogIn.c \ @@ -295,7 +292,6 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_ASF:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(STM_SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_EXPANDED:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_MODULE_EXPANDED:.c=.o)) diff --git a/atmel-samd/access_vfs.h b/atmel-samd/access_vfs.h index c1cd635fc..edcb2eaa3 100644 --- a/atmel-samd/access_vfs.h +++ b/atmel-samd/access_vfs.h @@ -27,8 +27,8 @@ // This adapts the ASF access API to MicroPython's VFS API so we can expose all // VFS block devices as Lun's over USB mass storage control. -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H +#define MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H #include "asf/common/services/storage/ctrl_access/ctrl_access.h" @@ -39,4 +39,4 @@ bool vfs_removal(void); Ctrl_status vfs_usb_read_10(uint32_t addr, uint16_t nb_sector); Ctrl_status vfs_usb_write_10(uint32_t addr, uint16_t nb_sector); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_ROM_FS_H diff --git a/atmel-samd/autoreload.h b/atmel-samd/autoreload.h index cb54893c2..6bf0ed011 100644 --- a/atmel-samd/autoreload.h +++ b/atmel-samd/autoreload.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H +#define MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H #include <stdbool.h> @@ -39,4 +39,4 @@ void autoreload_enable(void); void autoreload_disable(void); bool autoreload_is_enabled(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_AUTORELOAD_H diff --git a/atmel-samd/background.h b/atmel-samd/background.h index 57b00d068..91f915887 100644 --- a/atmel-samd/background.h +++ b/atmel-samd/background.h @@ -24,9 +24,9 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H +#define MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H void run_background_tasks(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H diff --git a/atmel-samd/boards/board.h b/atmel-samd/boards/board.h index 72f3563a9..11584ab6e 100644 --- a/atmel-samd/boards/board.h +++ b/atmel-samd/boards/board.h @@ -26,8 +26,8 @@ // This file defines board specific functions. -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H +#define MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H #include <stdbool.h> @@ -42,4 +42,4 @@ bool board_requests_safe_mode(void); // Reset the state of off MCU components such as neopixels. void reset_board(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H diff --git a/atmel-samd/boards/flash_AT25DF081A.h b/atmel-samd/boards/flash_AT25DF081A.h index 436f7e36c..0671dfb1e 100644 --- a/atmel-samd/boards/flash_AT25DF081A.h +++ b/atmel-samd/boards/flash_AT25DF081A.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H +#define MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H // Settings for the Adesto Tech AT25DF081A 1MiB SPI flash. Its on the SAMD21 // Xplained board. @@ -49,4 +49,4 @@ #define SPI_FLASH_SECTOR_PROTECTION -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_AT25DF081A_H diff --git a/atmel-samd/boards/flash_GD25Q16C.h b/atmel-samd/boards/flash_GD25Q16C.h index ee7afa10d..6887c9adf 100644 --- a/atmel-samd/boards/flash_GD25Q16C.h +++ b/atmel-samd/boards/flash_GD25Q16C.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H +#define MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H // Settings for the Gigadevice GD25Q16C 2MiB SPI flash. // Datasheet: http://www.gigadevice.com/product/download/410.html?locale=en_US @@ -52,4 +52,4 @@ #define SPI_FLASH_JEDEC_CAPACITY 0x15 -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_GD25Q16C_H diff --git a/atmel-samd/boards/flash_S25FL216K.h b/atmel-samd/boards/flash_S25FL216K.h index 669b58b34..cb56d17dd 100644 --- a/atmel-samd/boards/flash_S25FL216K.h +++ b/atmel-samd/boards/flash_S25FL216K.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H +#define MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H // Settings for the Cypress (was Spansion) S25FL216K 2MiB SPI flash. // Datasheet: http://www.cypress.com/file/197346/download @@ -51,4 +51,4 @@ #define SPI_FLASH_JEDEC_MEMORY_TYPE 0x40 #define SPI_FLASH_JEDEC_CAPACITY 0x15 -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARD_FLASH_S25FL216K_H diff --git a/atmel-samd/common-hal/analogio/AnalogIn.h b/atmel-samd/common-hal/analogio/AnalogIn.h index daf825f87..458c6fa30 100644 --- a/atmel-samd/common-hal/analogio/AnalogIn.h +++ b/atmel-samd/common-hal/analogio/AnalogIn.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGIN_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGIN_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGIN_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGIN_H #include "common-hal/microcontroller/Pin.h" @@ -46,4 +46,4 @@ typedef struct { void analogin_reset(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGIN_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGIN_H diff --git a/atmel-samd/common-hal/analogio/AnalogOut.h b/atmel-samd/common-hal/analogio/AnalogOut.h index 5223f759d..1c2705a83 100644 --- a/atmel-samd/common-hal/analogio/AnalogOut.h +++ b/atmel-samd/common-hal/analogio/AnalogOut.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGOUT_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGOUT_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGOUT_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGOUT_H #include "common-hal/microcontroller/Pin.h" @@ -38,4 +38,4 @@ typedef struct { struct dac_module dac_instance; } analogio_analogout_obj_t; -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGOUT_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ANALOGIO_ANALOGOUT_H diff --git a/atmel-samd/common-hal/audiobusio/PDMIn.h b/atmel-samd/common-hal/audiobusio/PDMIn.h index beeae566e..71f36c0d6 100644 --- a/atmel-samd/common-hal/audiobusio/PDMIn.h +++ b/atmel-samd/common-hal/audiobusio/PDMIn.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H #include "common-hal/microcontroller/Pin.h" #include "asf/sam0/drivers/i2s/i2s.h" @@ -50,4 +50,4 @@ void pdmin_reset(void); void pdmin_background(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H diff --git a/atmel-samd/common-hal/audioio/AudioOut.h b/atmel-samd/common-hal/audioio/AudioOut.h index ffbccfee2..738a2aa6c 100644 --- a/atmel-samd/common-hal/audioio/AudioOut.h +++ b/atmel-samd/common-hal/audioio/AudioOut.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOIO_AUDIOOUT_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOIO_AUDIOOUT_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOIO_AUDIOOUT_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOIO_AUDIOOUT_H #include "common-hal/microcontroller/Pin.h" #include "asf/sam0/drivers/tc/tc.h" @@ -58,4 +58,4 @@ void audioout_reset(void); void audioout_background(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOIO_AUDIOOUT_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOIO_AUDIOOUT_H diff --git a/atmel-samd/common-hal/busio/I2C.h b/atmel-samd/common-hal/busio/I2C.h index c81794e08..8b1aa2fe9 100644 --- a/atmel-samd/common-hal/busio/I2C.h +++ b/atmel-samd/common-hal/busio/I2C.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_H #include "common-hal/microcontroller/Pin.h" @@ -40,4 +40,4 @@ typedef struct { uint8_t sda_pin; } busio_i2c_obj_t; -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_H diff --git a/atmel-samd/common-hal/busio/OneWire.h b/atmel-samd/common-hal/busio/OneWire.h index 8b61260fc..a09a44c26 100644 --- a/atmel-samd/common-hal/busio/OneWire.h +++ b/atmel-samd/common-hal/busio/OneWire.h @@ -24,10 +24,10 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_ONEWIRE_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_ONEWIRE_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_ONEWIRE_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_ONEWIRE_H // Use bitbangio. #include "shared-module/busio/OneWire.h" -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_ONEWIRE_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_ONEWIRE_H diff --git a/atmel-samd/common-hal/busio/SPI.h b/atmel-samd/common-hal/busio/SPI.h index 9016ecff2..2644c876f 100644 --- a/atmel-samd/common-hal/busio/SPI.h +++ b/atmel-samd/common-hal/busio/SPI.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_SPI_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_SPI_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_SPI_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_SPI_H #include "common-hal/microcontroller/Pin.h" @@ -42,4 +42,4 @@ typedef struct { uint32_t current_baudrate; } busio_spi_obj_t; -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_SPI_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_SPI_H diff --git a/atmel-samd/common-hal/busio/UART.h b/atmel-samd/common-hal/busio/UART.h index 411d7f588..5adc11514 100644 --- a/atmel-samd/common-hal/busio/UART.h +++ b/atmel-samd/common-hal/busio/UART.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_UART_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_UART_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_UART_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_UART_H #include "common-hal/microcontroller/Pin.h" @@ -47,4 +47,4 @@ typedef struct { uint8_t* buffer; } busio_uart_obj_t; -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_UART_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_UART_H diff --git a/atmel-samd/common-hal/digitalio/DigitalInOut.h b/atmel-samd/common-hal/digitalio/DigitalInOut.h index eeeb3710f..9ea6dcfd1 100644 --- a/atmel-samd/common-hal/digitalio/DigitalInOut.h +++ b/atmel-samd/common-hal/digitalio/DigitalInOut.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DIGITALIO_DIGITALINOUT_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DIGITALIO_DIGITALINOUT_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DIGITALIO_DIGITALINOUT_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DIGITALIO_DIGITALINOUT_H #include "common-hal/microcontroller/Pin.h" #include "py/obj.h" @@ -37,4 +37,5 @@ typedef struct { bool open_drain; } digitalio_digitalinout_obj_t; -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DIGITALIO_DIGITALINOUT_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DIGITALIO_DIGITALINOUT_H + diff --git a/atmel-samd/common-hal/microcontroller/Pin.h b/atmel-samd/common-hal/microcontroller/Pin.h index fdf05885d..31c083311 100644 --- a/atmel-samd/common-hal/microcontroller/Pin.h +++ b/atmel-samd/common-hal/microcontroller/Pin.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_MICROCONTROLLER_PIN_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_MICROCONTROLLER_PIN_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_MICROCONTROLLER_PIN_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_MICROCONTROLLER_PIN_H // Don't reorder these includes because they are dependencies of adc_feature.h. // They should really be included by adc_feature.h. @@ -84,4 +84,4 @@ void reset_all_pins(void); void reset_pin(uint8_t pin); void claim_pin(const mcu_pin_obj_t* pin); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_MICROCONTROLLER_PIN_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_MICROCONTROLLER_PIN_H diff --git a/atmel-samd/common-hal/nvm/ByteArray.h b/atmel-samd/common-hal/nvm/ByteArray.h index cd23c894d..f6a816cb9 100644 --- a/atmel-samd/common-hal/nvm/ByteArray.h +++ b/atmel-samd/common-hal/nvm/ByteArray.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_NVM_BYTEARRAY_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_NVM_BYTEARRAY_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_NVM_BYTEARRAY_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_NVM_BYTEARRAY_H #include "py/obj.h" @@ -35,4 +35,4 @@ typedef struct { uint32_t len; } nvm_bytearray_obj_t; -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_NVM_BYTEARRAY_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_NVM_BYTEARRAY_H diff --git a/atmel-samd/common-hal/pulseio/PWMOut.h b/atmel-samd/common-hal/pulseio/PWMOut.h index 2673078e9..67eabd92e 100644 --- a/atmel-samd/common-hal/pulseio/PWMOut.h +++ b/atmel-samd/common-hal/pulseio/PWMOut.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PWMOUT_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PWMOUT_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PWMOUT_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PWMOUT_H #include "common-hal/microcontroller/Pin.h" #include "asf/sam0/drivers/tc/tc.h" @@ -46,4 +46,4 @@ typedef struct { void pwmout_reset(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PWMOUT_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PWMOUT_H diff --git a/atmel-samd/common-hal/pulseio/PulseIn.h b/atmel-samd/common-hal/pulseio/PulseIn.h index 976af48a4..f577a6131 100644 --- a/atmel-samd/common-hal/pulseio/PulseIn.h +++ b/atmel-samd/common-hal/pulseio/PulseIn.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEIN_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEIN_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEIN_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEIN_H #include "common-hal/microcontroller/Pin.h" @@ -46,4 +46,4 @@ typedef struct { void pulsein_reset(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEIN_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEIN_H diff --git a/atmel-samd/common-hal/pulseio/PulseOut.h b/atmel-samd/common-hal/pulseio/PulseOut.h index 08ed3277d..29690fdd1 100644 --- a/atmel-samd/common-hal/pulseio/PulseOut.h +++ b/atmel-samd/common-hal/pulseio/PulseOut.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H #include "common-hal/microcontroller/Pin.h" #include "asf/sam0/drivers/tc/tc.h" @@ -41,4 +41,4 @@ typedef struct { void pulseout_reset(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H diff --git a/atmel-samd/common-hal/touchio/TouchIn.h b/atmel-samd/common-hal/touchio/TouchIn.h index bb6325e8e..d4cd1539b 100644 --- a/atmel-samd/common-hal/touchio/TouchIn.h +++ b/atmel-samd/common-hal/touchio/TouchIn.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_TOUCHIO_TOUCHIN_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_TOUCHIO_TOUCHIN_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_TOUCHIO_TOUCHIN_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_TOUCHIO_TOUCHIN_H #include "common-hal/microcontroller/Pin.h" @@ -43,4 +43,4 @@ typedef struct { void touchin_reset(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_TOUCHIO_TOUCHIN_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_TOUCHIO_TOUCHIN_H diff --git a/atmel-samd/common-hal/usb_hid/types.h b/atmel-samd/common-hal/usb_hid/types.h index 4d72ae0ca..850d78fd1 100644 --- a/atmel-samd/common-hal/usb_hid/types.h +++ b/atmel-samd/common-hal/usb_hid/types.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_COMMON_HAL_USB_HID_TYPES_H__ -#define __MICROPY_INCLUDED_COMMON_HAL_USB_HID_TYPES_H__ +#ifndef MICROPY_INCLUDED_COMMON_HAL_USB_HID_TYPES_H +#define MICROPY_INCLUDED_COMMON_HAL_USB_HID_TYPES_H #include "conf_usb.h" @@ -42,4 +42,4 @@ typedef struct { uint8_t usage; } usb_hid_device_obj_t; -#endif // __MICROPY_INCLUDED_COMMON_HAL_USB_HID_TYPES_H__ +#endif // MICROPY_INCLUDED_COMMON_HAL_USB_HID_TYPES_H diff --git a/atmel-samd/flash_api.h b/atmel-samd/flash_api.h index 91bf7dc8b..e96e59621 100644 --- a/atmel-samd/flash_api.h +++ b/atmel-samd/flash_api.h @@ -23,8 +23,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_FLASH_API_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_FLASH_API_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_FLASH_API_H +#define MICROPY_INCLUDED_ATMEL_SAMD_FLASH_API_H #include "extmod/vfs_fat.h" @@ -33,4 +33,4 @@ extern void flash_flush(void); void flash_set_usb_writeable(bool usb_writeable); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_FLASH_API_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_FLASH_API_H diff --git a/atmel-samd/internal_flash.h b/atmel-samd/internal_flash.h index e8b4d7ae0..3335c58fb 100644 --- a/atmel-samd/internal_flash.h +++ b/atmel-samd/internal_flash.h @@ -23,8 +23,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H +#define MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H #include <stdbool.h> @@ -58,4 +58,4 @@ extern const struct _mp_obj_type_t internal_flash_type; struct _fs_user_mount_t; void flash_init_vfs(struct _fs_user_mount_t *vfs); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H diff --git a/atmel-samd/mphalport.h b/atmel-samd/mphalport.h index 4848e1404..a4dbf6a7d 100644 --- a/atmel-samd/mphalport.h +++ b/atmel-samd/mphalport.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_MPHALPORT_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_MPHALPORT_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_MPHALPORT_H +#define MICROPY_INCLUDED_ATMEL_SAMD_MPHALPORT_H #include "py/obj.h" @@ -53,4 +53,4 @@ void mp_hal_disable_all_interrupts(void); void mp_hal_enable_all_interrupts(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_MPHALPORT_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_MPHALPORT_H diff --git a/atmel-samd/reset.h b/atmel-samd/reset.h index 5ed2e0140..1a287654a 100644 --- a/atmel-samd/reset.h +++ b/atmel-samd/reset.h @@ -23,9 +23,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_RESET_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_RESET_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_RESET_H +#define MICROPY_INCLUDED_ATMEL_SAMD_RESET_H void reset_to_bootloader(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_RESET_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_RESET_H diff --git a/atmel-samd/rgb_led_status.h b/atmel-samd/rgb_led_status.h index 6d5d69373..1dfc6169c 100644 --- a/atmel-samd/rgb_led_status.h +++ b/atmel-samd/rgb_led_status.h @@ -1,5 +1,32 @@ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_RGB_LED_STATUS_H -#define __MICROPY_INCLUDED_ATMEL_SAMD_RGB_LED_STATUS_H +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2013, 2014 Damien P. George + * Copyright (c) 2014 Paul Sokolovsky + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_RGB_LED_STATUS_H +#define MICROPY_INCLUDED_ATMEL_SAMD_RGB_LED_STATUS_H #include <stdint.h> #include <stdbool.h> @@ -20,4 +47,4 @@ void clear_temp_status(void); uint32_t color_brightness(uint32_t color, uint8_t brightness); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_RGB_LED_STATUS_H +#endif // MICROPY_INCLUDED_ATMEL_SAMD_RGB_LED_STATUS_H diff --git a/atmel-samd/samd21_pins.h b/atmel-samd/samd21_pins.h index 629941f81..fb8888ff2 100644 --- a/atmel-samd/samd21_pins.h +++ b/atmel-samd/samd21_pins.h @@ -1,5 +1,31 @@ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_SAMD21_PINS_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_SAMD21_PINS_H__ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 by Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_SAMD21_PINS_H +#define MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_SAMD21_PINS_H #include "common-hal/microcontroller/Pin.h" @@ -173,4 +199,4 @@ extern const mcu_pin_obj_t pin_PB02; extern const mcu_pin_obj_t pin_PB03; #endif -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_SAMD21_PINS_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_SAMD21_PINS_H diff --git a/atmel-samd/shared_dma.h b/atmel-samd/shared_dma.h index 380d561c6..3511b763f 100644 --- a/atmel-samd/shared_dma.h +++ b/atmel-samd/shared_dma.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_SHARED_DMA_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_SHARED_DMA_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_SHARED_DMA_H +#define MICROPY_INCLUDED_ATMEL_SAMD_SHARED_DMA_H #include "asf/sam0/drivers/dma/dma.h" @@ -44,4 +44,4 @@ enum status_code shared_dma_read(Sercom* sercom, uint8_t* buffer, uint32_t lengt bool allocate_block_counter(void); void switch_audiodma_trigger(uint8_t trigger_dmac_id); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_SHARED_DMA_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_SHARED_DMA_H diff --git a/atmel-samd/spi_flash.h b/atmel-samd/spi_flash.h index 718b69f4a..388d3010b 100644 --- a/atmel-samd/spi_flash.h +++ b/atmel-samd/spi_flash.h @@ -23,8 +23,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_SPI_FLASH_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_SPI_FLASH_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_SPI_FLASH_H +#define MICROPY_INCLUDED_ATMEL_SAMD_SPI_FLASH_H #include <stdbool.h> @@ -57,4 +57,4 @@ extern const struct _mp_obj_type_t spi_flash_type; struct _fs_user_mount_t; void flash_init_vfs(struct _fs_user_mount_t *vfs); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_SPI_FLASH_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_SPI_FLASH_H diff --git a/atmel-samd/tick.h b/atmel-samd/tick.h index 3f6f4959a..b7dbeebe1 100644 --- a/atmel-samd/tick.h +++ b/atmel-samd/tick.h @@ -23,8 +23,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_TICK_H__ -#define __MICROPY_INCLUDED_ATMEL_SAMD_TICK_H__ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_TICK_H +#define MICROPY_INCLUDED_ATMEL_SAMD_TICK_H #include "mpconfigport.h" @@ -34,4 +34,4 @@ extern struct tc_module ms_timer; void tick_init(void); -#endif // __MICROPY_INCLUDED_ATMEL_SAMD_TICK_H__ +#endif // MICROPY_INCLUDED_ATMEL_SAMD_TICK_H |
