Skip to content

Commit 1fd0c8d

Browse files
conejoninjadeadprogram
authored andcommitted
adds PowerSupplyActive to enable supply voltages to nRF52840 and (#430)
* machine/reelboard: adds PowerSupplyActive to enable supply voltages to nRF52840 and peripherals.
1 parent d34bb7e commit 1fd0c8d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/machine/board_reelboard.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package machine
44

55
const HasLowFrequencyCrystal = true
66

7-
// LEDs on the reel board
7+
// Pins on the reel board
88
const (
99
LED Pin = LED1
1010
LED1 Pin = LED_YELLOW
@@ -47,3 +47,15 @@ const (
4747
SPI0_MOSI_PIN Pin = 45
4848
SPI0_MISO_PIN Pin = 46
4949
)
50+
51+
// PowerSupplyActive enables the supply voltages for nRF52840 and peripherals (true) or only for nRF52840 (false)
52+
// This controls the TPS610981 boost converter. You must turn the power supply active in order to use the EPD and
53+
// other onboard peripherals.
54+
func PowerSupplyActive(active bool) {
55+
POWER_SUPPLY_PIN.Configure(PinConfig{Mode: PinOutput})
56+
if active {
57+
POWER_SUPPLY_PIN.High()
58+
} else {
59+
POWER_SUPPLY_PIN.Low()
60+
}
61+
}

0 commit comments

Comments
 (0)