File tree Expand file tree Collapse file tree
boards/feather_nrf52840_express
common-hal/microcontroller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555
5656#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
5757
58- // TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192
58+ #define CIRCUITPY_INTERNAL_NVM_SIZE (4096)
5959
6060#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
6161
Original file line number Diff line number Diff line change 2424 * THE SOFTWARE.
2525 */
2626
27+ #include "py/mphal.h"
28+ #include "py/obj.h"
29+ #include "py/runtime.h"
30+
2731#include "common-hal/microcontroller/Pin.h"
2832#include "common-hal/microcontroller/Processor.h"
2933
34+ #include "shared-bindings/nvm/ByteArray.h"
3035#include "shared-bindings/microcontroller/__init__.h"
3136#include "shared-bindings/microcontroller/Pin.h"
3237#include "shared-bindings/microcontroller/Processor.h"
@@ -63,6 +68,17 @@ const mcu_processor_obj_t common_hal_mcu_processor_obj = {
6368 },
6469};
6570
71+ #if CIRCUITPY_INTERNAL_NVM_SIZE > 0
72+ // The singleton nvm.ByteArray object.
73+ const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = {
74+ .base = {
75+ .type = & nvm_bytearray_type ,
76+ },
77+ .len = CIRCUITPY_INTERNAL_NVM_SIZE ,
78+ .start_address = 0
79+ };
80+ #endif
81+
6682
6783STATIC const mp_rom_map_elem_t mcu_pin_globals_table [] = {
6884 { MP_ROM_QSTR (MP_QSTR_P0_00 ), MP_ROM_PTR (& pin_P0_00 ) },
You can’t perform that action at this time.
0 commit comments