diff --git a/ports/nrf/boards/challenger_840/board.c b/ports/nrf/boards/challenger_840/board.c index fb1ce4fb83..14a52fc4de 100644 --- a/ports/nrf/boards/challenger_840/board.c +++ b/ports/nrf/boards/challenger_840/board.c @@ -23,7 +23,3 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ - -#include "supervisor/board.h" - -// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/nrf/boards/challenger_840/challenger_840.py b/ports/nrf/boards/challenger_840/challenger_840.py new file mode 100644 index 0000000000..bf3ae77170 --- /dev/null +++ b/ports/nrf/boards/challenger_840/challenger_840.py @@ -0,0 +1,16 @@ +import board +import digitalio + +_LDO_PIN = digitalio.DigitalInOut(board.LDO_CONTROL) +_LDO_PIN.direction = digitalio.Direction.OUTPUT +_LDO_PIN.value = True + + +def ldo_on(): + global _LDO_PIN + _LDO_PIN.value = True + + +def ldo_off(): + global _LDO_PIN + _LDO_PIN.value = False diff --git a/ports/nrf/boards/challenger_840/mpconfigboard.mk b/ports/nrf/boards/challenger_840/mpconfigboard.mk index ddb55ce705..03cbc20b21 100644 --- a/ports/nrf/boards/challenger_840/mpconfigboard.mk +++ b/ports/nrf/boards/challenger_840/mpconfigboard.mk @@ -6,4 +6,8 @@ USB_MANUFACTURER = "Invector Labs AB" MCU_CHIP = nrf52840 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ,W25Q32FV,W25Q64FV" +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ,W25Q32FV,W25Q32JVxQ,W25Q64FV,W25Q64JVxQ" + +FROZEN_MPY_DIRS += $(TOP)/ports/nrf/boards/challenger_840 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/nrf/boards/challenger_840/pins.c b/ports/nrf/boards/challenger_840/pins.c index 26d780fffe..e059c17a15 100644 --- a/ports/nrf/boards/challenger_840/pins.c +++ b/ports/nrf/boards/challenger_840/pins.c @@ -32,6 +32,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_LDO_CONTROL), MP_ROM_PTR(&pin_P1_09) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_12) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_11) },