From 395d7d98dee775a2a26b5ee9cd2d090e97ea4c41 Mon Sep 17 00:00:00 2001 From: Daniel Esteban Date: Sun, 30 Jun 2019 11:02:25 +0200 Subject: [PATCH 1/2] adds PowerSupplyActive to enable supply voltages to nRF52840 and peripherals --- src/machine/board_reelboard.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/machine/board_reelboard.go b/src/machine/board_reelboard.go index 202a3daee0..7969ed9db8 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,13 @@ 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) +func PowerSupplyActive(active bool) { + POWER_SUPPLY_PIN.Configure(PinConfig{Mode: PinOutput}) + if active { + POWER_SUPPLY_PIN.High() + } else { + POWER_SUPPLY_PIN.Low() + } +} From a390af76eb509807350c3a1faa725fa79783c0cb Mon Sep 17 00:00:00 2001 From: Daniel Esteban Date: Sun, 30 Jun 2019 12:15:38 +0200 Subject: [PATCH 2/2] added comment about boost converter --- src/machine/board_reelboard.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/machine/board_reelboard.go b/src/machine/board_reelboard.go index 7969ed9db8..77af29de15 100644 --- a/src/machine/board_reelboard.go +++ b/src/machine/board_reelboard.go @@ -49,6 +49,8 @@ const ( ) // 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 {