atmel-samd: Only include bitbangio on boards with flash.
This commit is contained in:
parent
8ef0dd095a
commit
f4a1da4be9
|
@ -10,3 +10,5 @@
|
|||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#include "internal_flash.h"
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
|
||||
|
|
|
@ -20,3 +20,5 @@
|
|||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#include "spi_flash.h"
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000)
|
||||
|
|
|
@ -9,3 +9,5 @@
|
|||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#include "internal_flash.h"
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
|
||||
|
|
|
@ -9,3 +9,5 @@
|
|||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#include "internal_flash.h"
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
|
||||
|
|
|
@ -21,3 +21,5 @@
|
|||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#include "spi_flash.h"
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000)
|
||||
|
|
|
@ -8,3 +8,5 @@
|
|||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#include "internal_flash.h"
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
|
||||
|
|
|
@ -35,3 +35,5 @@
|
|||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#include "spi_flash.h"
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000)
|
||||
|
|
|
@ -8,3 +8,5 @@
|
|||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#include "internal_flash.h"
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
|
||||
|
|
|
@ -111,6 +111,9 @@ typedef long mp_off_t;
|
|||
#define MICROPY_PORT_BUILTINS \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
|
||||
|
||||
// board specific definitions
|
||||
#include "mpconfigboard.h"
|
||||
|
||||
// extra built in modules to add to the list of known ones
|
||||
extern const struct _mp_obj_module_t microcontroller_module;
|
||||
extern const struct _mp_obj_module_t bitbangio_module;
|
||||
|
@ -121,21 +124,25 @@ extern const struct _mp_obj_module_t time_module;
|
|||
extern const struct _mp_obj_module_t neopixel_write_module;
|
||||
extern const struct _mp_obj_module_t uheap_module;
|
||||
|
||||
#if BOARD_FLASH_SIZE > 192000
|
||||
#define EXTRA_BUILTIN_MODULES \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_bitbangio), (mp_obj_t)&bitbangio_module }
|
||||
#else
|
||||
#define EXTRA_BUILTIN_MODULES
|
||||
#endif
|
||||
|
||||
#define MICROPY_PORT_BUILTIN_MODULES \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_microcontroller), (mp_obj_t)µcontroller_module }, \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_bitbangio), (mp_obj_t)&bitbangio_module }, \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_nativeio), (mp_obj_t)&nativeio_module }, \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_board), (mp_obj_t)&board_module }, \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&uos_module }, \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&time_module }, \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_neopixel_write),(mp_obj_t)&neopixel_write_module }
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_neopixel_write),(mp_obj_t)&neopixel_write_module }, \
|
||||
EXTRA_BUILTIN_MODULES
|
||||
|
||||
#define MICROPY_PORT_BUILTIN_DEBUG_MODULES \
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_uheap),(mp_obj_t)&uheap_module }
|
||||
|
||||
// board specific definitions
|
||||
#include "mpconfigboard.h"
|
||||
|
||||
#ifndef MICROPY_PIN_DEFS_PORT_H
|
||||
#define MICROPY_PIN_DEFS_PORT_H "pins.h"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue