Skip to content

Commit f7e735b

Browse files
committed
Added LDO control pin, new flash variants and support functions for the LDO control pin.
1 parent 9ef5b7d commit f7e735b

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

ports/nrf/boards/challenger_840/board.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,3 @@
2323
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2424
* THE SOFTWARE.
2525
*/
26-
27-
#include "supervisor/board.h"
28-
#include "nrf_gpio.h"
29-
30-
#define PORTPIN(x, y) (x * 32 + y)
31-
32-
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
33-
void board_init(void) {
34-
nrf_gpio_cfg_output(PORTPIN(1, 9));
35-
nrf_gpio_pin_write(PORTPIN(1, 9), 1);
36-
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import board
2+
import digitalio
3+
4+
_LDO_PIN = digitalio.DigitalInOut(board.LDO_CONTROL)
5+
_LDO_PIN.direction = digitalio.Direction.OUTPUT
6+
_LDO_PIN.value = True
7+
8+
def ldo_on():
9+
global _LDO_PIN
10+
_LDO_PIN.value = True
11+
12+
def ldo_off():
13+
global _LDO_PIN
14+
_LDO_PIN.value = False

ports/nrf/boards/challenger_840/mpconfigboard.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ USB_MANUFACTURER = "Invector Labs AB"
66
MCU_CHIP = nrf52840
77

88
SPI_FLASH_FILESYSTEM = 1
9-
EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ,W25Q32FV,W25Q64FV"
9+
EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ,W25Q32FV,W25Q32JVxQ,W25Q64FV,W25Q64JVxQ"
10+
11+
FROZEN_MPY_DIRS += $(TOP)/ports/nrf/boards/challenger_840
12+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE
13+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel

0 commit comments

Comments
 (0)