Skip to content

Commit 51c5257

Browse files
committed
Update startup SCL toggling pinmap definitions
1 parent 2a299fe commit 51c5257

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/main.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "drivers/Cst816s.h"
4646
#include "drivers/PinMap.h"
4747
#include "systemtask/SystemTask.h"
48+
#include "drivers/PinMap.h"
4849

4950
#if NRF_LOG_ENABLED
5051
#include "logging/NrfLogger.h"
@@ -293,18 +294,18 @@ int main(void) {
293294
nrf_drv_clock_init();
294295

295296
// Unblock i2c?
296-
nrf_gpio_cfg(pinTwiScl,
297+
nrf_gpio_cfg(Pinetime::PinMap::TwiScl,
297298
NRF_GPIO_PIN_DIR_OUTPUT,
298299
NRF_GPIO_PIN_INPUT_DISCONNECT,
299300
NRF_GPIO_PIN_NOPULL,
300301
NRF_GPIO_PIN_S0D1,
301302
NRF_GPIO_PIN_NOSENSE);
302-
nrf_gpio_pin_set(pinTwiScl);
303+
nrf_gpio_pin_set(Pinetime::PinMap::TwiScl);
303304
for (uint8_t i = 0; i < 16; i++) {
304-
nrf_gpio_pin_toggle(pinTwiScl);
305+
nrf_gpio_pin_toggle(Pinetime::PinMap::TwiScl);
305306
nrf_delay_us(5);
306307
}
307-
nrf_gpio_cfg_default(pinTwiScl);
308+
nrf_gpio_cfg_default(Pinetime::PinMap::TwiScl);
308309

309310
debounceTimer = xTimerCreate("debounceTimer", 200, pdFALSE, (void*) 0, DebounceTimerCallback);
310311
debounceChargeTimer = xTimerCreate("debounceTimerCharge", 200, pdFALSE, (void*) 0, DebounceTimerChargeCallback);

0 commit comments

Comments
 (0)