aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDaniel Esteban <[email protected]>2019-06-30 12:23:44 +0200
committerRon Evans <[email protected]>2019-06-30 12:23:44 +0200
commit1fd0c8d48cde0228244be0c2d5ea720eddb683d6 (patch)
tree8f958896f4ffb54f6a960285fa50c41e51292a7a
parentd34bb7e7082225b9909e62601276055c1161c80f (diff)
downloadtinygo-1fd0c8d48cde0228244be0c2d5ea720eddb683d6.tar.gz
tinygo-1fd0c8d48cde0228244be0c2d5ea720eddb683d6.zip
adds PowerSupplyActive to enable supply voltages to nRF52840 and (#430)
* machine/reelboard: adds PowerSupplyActive to enable supply voltages to nRF52840 and peripherals.
-rw-r--r--src/machine/board_reelboard.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/machine/board_reelboard.go b/src/machine/board_reelboard.go
index 202a3daee..77af29de1 100644
--- a/src/machine/board_reelboard.go
+++ b/src/machine/board_reelboard.go
@@ -4,7 +4,7 @@ package machine
const HasLowFrequencyCrystal = true
-// LEDs on the reel board
+// Pins on the reel board
const (
LED Pin = LED1
LED1 Pin = LED_YELLOW
@@ -47,3 +47,15 @@ const (
SPI0_MOSI_PIN Pin = 45
SPI0_MISO_PIN Pin = 46
)
+
+// PowerSupplyActive enables the supply voltages for nRF52840 and peripherals (true) or only for nRF52840 (false)
+// This controls the TPS610981 boost converter. You must turn the power supply active in order to use the EPD and
+// other onboard peripherals.
+func PowerSupplyActive(active bool) {
+ POWER_SUPPLY_PIN.Configure(PinConfig{Mode: PinOutput})
+ if active {
+ POWER_SUPPLY_PIN.High()
+ } else {
+ POWER_SUPPLY_PIN.Low()
+ }
+}