From 075a11fe6cb91f9fdeaa9ff10402b154dfadbc92 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Fri, 26 Jan 2024 10:23:23 -0800 Subject: [PATCH 01/15] change --- target-locked.json | 2 +- target.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target-locked.json b/target-locked.json index b9097603..973e2219 100644 --- a/target-locked.json +++ b/target-locked.json @@ -26,7 +26,7 @@ "DEVICE_STACK_SIZE": 2048, "DEVICE_TAG": 0, "DEVICE_USB": 0, - "DMESG_SERIAL_DEBUG": 0, + "DMESG_SERIAL_DEBUG": 1, "EVENT_LISTENER_DEFAULT_FLAGS": "MESSAGE_BUS_LISTENER_QUEUE_IF_BUSY", "HARDWARE_NEOPIXEL": 1, "LED_MATRIX_MAXIMUM_BRIGHTNESS": 245, diff --git a/target.json b/target.json index 32981b8b..2de1ab5f 100644 --- a/target.json +++ b/target.json @@ -25,7 +25,7 @@ "DEVICE_COMPONENT_COUNT":60, "DEVICE_DEFAULT_PULLMODE":"PullMode::Down", "DEVICE_PANIC_HEAP_FULL":1, - "DMESG_SERIAL_DEBUG":0, + "DMESG_SERIAL_DEBUG":1, "CODAL_DEBUG":"CODAL_DEBUG_DISABLED", "DEVICE_USB":0, "CODAL_TIMESTAMP":"uint64_t", From 8a425b4f3415177bea1934326ea097b414685983 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Fri, 26 Jan 2024 16:24:23 -0800 Subject: [PATCH 02/15] configure NFC as GPIO --- model/MicroBit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index b2c61405..11797e58 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -95,7 +95,7 @@ MicroBit::MicroBit() : // Clear our status status = 0; - /* + // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. if (NRF_UICR->NFCPINS) { @@ -114,7 +114,6 @@ MicroBit::MicroBit() : // Reset, so the changes can take effect. NVIC_SystemReset(); } - */ // Configure serial port for debugging From e65258804815109afa6a0bcb11c6418f82549afc Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Fri, 26 Jan 2024 16:44:47 -0800 Subject: [PATCH 03/15] stop ble build --- target-locked.json | 2 +- target.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target-locked.json b/target-locked.json index 973e2219..c4132896 100644 --- a/target-locked.json +++ b/target-locked.json @@ -13,7 +13,7 @@ "CODAL_TIMESTAMP": "uint64_t", "CONFIG_GPIO_AS_PINRESET": 1, "CONFIG_NFCT_PINS_AS_GPIOS": 1, - "DEVICE_BLE": 1, + "DEVICE_BLE": 0, "DEVICE_COMPONENT_COUNT": 60, "DEVICE_DEFAULT_PULLMODE": "PullMode::Down", "DEVICE_DEFAULT_SERIAL_MODE": "SYNC_SLEEP", diff --git a/target.json b/target.json index 2de1ab5f..d078e513 100644 --- a/target.json +++ b/target.json @@ -42,7 +42,7 @@ "CAPTOUCH_DEFAULT_CALIBRATION" : 3500, "HARDWARE_NEOPIXEL": 1, "CODAL_TIMER_32BIT": 1, - "DEVICE_BLE": 1 + "DEVICE_BLE": 0 }, "definitions":"-DAPP_TIMER_V2 -DAPP_TIMER_V2_RTC1_ENABLED -DNRF_DFU_TRANSPORT_BLE=1 -DNRF52833_XXAA -DNRF52833 -DTARGET_MCU_NRF52833 -DNRF5 -DNRF52833 -D__CORTEX_M4 -DS113 -DTOOLCHAIN_GCC -D__START=target_start", From 4f9e38d7d0c2c61c89e525cbfbaaa54baebf349a Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 19:17:12 -0800 Subject: [PATCH 04/15] change NFC to what pxt-arcade has --- model/MicroBit.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index 11797e58..04d706a6 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -47,6 +47,42 @@ static const uint32_t reflash_status = 0xffffffff; static volatile MicroBitNoInitMemoryRegion __attribute__ ((section (".noinit"))) microbit_no_init_memory_region; +#if defined(NRF52840) || defined(NRF52833) +#define IS_3_3_V() ((NRF_UICR->REGOUT0 & 7) == 5) +#else +#define IS_3_3_V() 1 +#endif + +static void disableNFConPins() { + // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. + if (NRF_UICR->NFCPINS || !IS_3_3_V()) { + DMESG("RESET UICR\n"); + // Enable Flash Writes + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + ; + + // Configure PINS for GPIO use. + if (NRF_UICR->NFCPINS) + NRF_UICR->NFCPINS = 0; + +#if defined(NRF52840) || defined(NRF52833) + // Set VDD to 3.3V + if ((NRF_UICR->REGOUT0 & 7) != 5) + NRF_UICR->REGOUT0 = (NRF_UICR->REGOUT0 & ~7) | 5; +#endif + + // Disable Flash Writes + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + ; + + // Reset, so the changes can take effect. + NVIC_SystemReset(); + } +} + + /** * Constructor. * @@ -95,7 +131,9 @@ MicroBit::MicroBit() : // Clear our status status = 0; + disableNFConPins(); + /* // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. if (NRF_UICR->NFCPINS) { @@ -114,6 +152,7 @@ MicroBit::MicroBit() : // Reset, so the changes can take effect. NVIC_SystemReset(); } +*/ // Configure serial port for debugging From e8a4e9b41f83a676f9778f90d029b4f82b6cedc4 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 19:28:38 -0800 Subject: [PATCH 05/15] debug --- model/MicroBit.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index 04d706a6..cab8f82f 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -54,6 +54,7 @@ static volatile MicroBitNoInitMemoryRegion __attribute__ ((section (".noinit"))) #endif static void disableNFConPins() { + DMESG("disableNFConPins\n"); // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. if (NRF_UICR->NFCPINS || !IS_3_3_V()) { DMESG("RESET UICR\n"); From 0548973ca0b8489c0829338c8d3bf794d0558d41 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 19:46:04 -0800 Subject: [PATCH 06/15] move disable --- model/MicroBit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index cab8f82f..46caa222 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -131,8 +131,6 @@ MicroBit::MicroBit() : { // Clear our status status = 0; - - disableNFConPins(); /* // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. @@ -268,6 +266,8 @@ int MicroBit::init() NVIC_SetPriority(UARTE0_UART0_IRQn, 2); // Serial port NVIC_SetPriority(GPIOTE_IRQn, 2); // Pin interrupt events + disableNFConPins(); + power.readInterfaceRequest(); #if CONFIG_ENABLED(DEVICE_BLE) && CONFIG_ENABLED(MICROBIT_BLE_PAIRING_MODE) From a8b3f20ae94d21e608c086a2740e68e33468b612 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 20:08:47 -0800 Subject: [PATCH 07/15] a hack to free up pins. --- model/MicroBit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index 46caa222..95f55763 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -108,7 +108,8 @@ MicroBit::MicroBit() : io(adc, touchSensor), serial(io.usbTx, io.usbRx, NRF_UARTE0), _i2c(io.sda, io.scl), - i2c(io.P20, io.P19), + i2c(io.sda, io.scl), + // i2c(io.P20, io.P19), power(_i2c, io, systemTimer), flash(_i2c, io, power), internalFlash(MICROBIT_STORAGE_PAGE, 1, MICROBIT_CODEPAGESIZE), From e286ca931a4bd251db8bd70c2f157bfbf4c052ea Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 21:01:00 -0800 Subject: [PATCH 08/15] restore --- model/MicroBit.cpp | 47 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index 95f55763..d20bffd9 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -54,10 +54,10 @@ static volatile MicroBitNoInitMemoryRegion __attribute__ ((section (".noinit"))) #endif static void disableNFConPins() { - DMESG("disableNFConPins\n"); + // DMESG("disableNFConPins\n"); // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. if (NRF_UICR->NFCPINS || !IS_3_3_V()) { - DMESG("RESET UICR\n"); + // DMESG("RESET UICR\n"); // Enable Flash Writes NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); while (NRF_NVMC->READY == NVMC_READY_READY_Busy) @@ -83,6 +83,26 @@ static void disableNFConPins() { } } + /* + // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. + if (NRF_UICR->NFCPINS) + { + DMESG("RESET UICR\n"); + // Enable Flash Writes + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy); + + // Configure PINS for GPIO use. + NRF_UICR->NFCPINS = 0; + + // Disable Flash Writes + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy); + + // Reset, so the changes can take effect. + NVIC_SystemReset(); + } +*/ /** * Constructor. @@ -133,26 +153,7 @@ MicroBit::MicroBit() : // Clear our status status = 0; - /* - // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. - if (NRF_UICR->NFCPINS) - { - DMESG("RESET UICR\n"); - // Enable Flash Writes - NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); - while (NRF_NVMC->READY == NVMC_READY_READY_Busy); - - // Configure PINS for GPIO use. - NRF_UICR->NFCPINS = 0; - - // Disable Flash Writes - NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); - while (NRF_NVMC->READY == NVMC_READY_READY_Busy); - - // Reset, so the changes can take effect. - NVIC_SystemReset(); - } -*/ + disableNFConPins(); // Configure serial port for debugging @@ -267,8 +268,6 @@ int MicroBit::init() NVIC_SetPriority(UARTE0_UART0_IRQn, 2); // Serial port NVIC_SetPriority(GPIOTE_IRQn, 2); // Pin interrupt events - disableNFConPins(); - power.readInterfaceRequest(); #if CONFIG_ENABLED(DEVICE_BLE) && CONFIG_ENABLED(MICROBIT_BLE_PAIRING_MODE) From 27bc6975061526452450f01d2680137e63ab43d7 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 21:10:05 -0800 Subject: [PATCH 09/15] try this instead --- model/MicroBit.cpp | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index d20bffd9..c74b527b 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -56,6 +56,28 @@ static volatile MicroBitNoInitMemoryRegion __attribute__ ((section (".noinit"))) static void disableNFConPins() { // DMESG("disableNFConPins\n"); // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. + + if (NRF_UICR->NFCPINS) + { + DMESG("RESET UICR\n"); + // Enable Flash Writes + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy); + + // Configure PINS for GPIO use. + NRF_UICR->NFCPINS = 0; + + // Disable Flash Writes + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy); + + // Reset, so the changes can take effect. + NVIC_SystemReset(); + } +} + + /* + // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. if (NRF_UICR->NFCPINS || !IS_3_3_V()) { // DMESG("RESET UICR\n"); // Enable Flash Writes @@ -81,27 +103,7 @@ static void disableNFConPins() { // Reset, so the changes can take effect. NVIC_SystemReset(); } -} - - /* - // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. - if (NRF_UICR->NFCPINS) - { - DMESG("RESET UICR\n"); - // Enable Flash Writes - NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); - while (NRF_NVMC->READY == NVMC_READY_READY_Busy); - // Configure PINS for GPIO use. - NRF_UICR->NFCPINS = 0; - - // Disable Flash Writes - NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); - while (NRF_NVMC->READY == NVMC_READY_READY_Busy); - - // Reset, so the changes can take effect. - NVIC_SystemReset(); - } */ /** From b1b7d1e23e8460cb98f267c7446332e998b0c363 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 21:14:23 -0800 Subject: [PATCH 10/15] try again --- model/MicroBit.cpp | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index c74b527b..484a2a68 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -56,28 +56,6 @@ static volatile MicroBitNoInitMemoryRegion __attribute__ ((section (".noinit"))) static void disableNFConPins() { // DMESG("disableNFConPins\n"); // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. - - if (NRF_UICR->NFCPINS) - { - DMESG("RESET UICR\n"); - // Enable Flash Writes - NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); - while (NRF_NVMC->READY == NVMC_READY_READY_Busy); - - // Configure PINS for GPIO use. - NRF_UICR->NFCPINS = 0; - - // Disable Flash Writes - NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); - while (NRF_NVMC->READY == NVMC_READY_READY_Busy); - - // Reset, so the changes can take effect. - NVIC_SystemReset(); - } -} - - /* - // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. if (NRF_UICR->NFCPINS || !IS_3_3_V()) { // DMESG("RESET UICR\n"); // Enable Flash Writes @@ -103,7 +81,30 @@ static void disableNFConPins() { // Reset, so the changes can take effect. NVIC_SystemReset(); } +} + /* + // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. + + + + if (NRF_UICR->NFCPINS) + { + DMESG("RESET UICR\n"); + // Enable Flash Writes + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy); + + // Configure PINS for GPIO use. + NRF_UICR->NFCPINS = 0; + + // Disable Flash Writes + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy); + + // Reset, so the changes can take effect. + NVIC_SystemReset(); + } */ /** From 490e13dd28675f914a46d03772d3d0e21185789e Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 21:22:46 -0800 Subject: [PATCH 11/15] remove old stuff --- model/MicroBit.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index 484a2a68..42a225bf 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -47,11 +47,7 @@ static const uint32_t reflash_status = 0xffffffff; static volatile MicroBitNoInitMemoryRegion __attribute__ ((section (".noinit"))) microbit_no_init_memory_region; -#if defined(NRF52840) || defined(NRF52833) #define IS_3_3_V() ((NRF_UICR->REGOUT0 & 7) == 5) -#else -#define IS_3_3_V() 1 -#endif static void disableNFConPins() { // DMESG("disableNFConPins\n"); @@ -67,11 +63,9 @@ static void disableNFConPins() { if (NRF_UICR->NFCPINS) NRF_UICR->NFCPINS = 0; -#if defined(NRF52840) || defined(NRF52833) // Set VDD to 3.3V if ((NRF_UICR->REGOUT0 & 7) != 5) NRF_UICR->REGOUT0 = (NRF_UICR->REGOUT0 & ~7) | 5; -#endif // Disable Flash Writes NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); From 19d1d0f2579ffab66b5ef64d869d19d47902622d Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 21:40:19 -0800 Subject: [PATCH 12/15] get the NF stuff in ASAP --- model/MicroBit.cpp | 8 ++++---- model/MicroBit.h | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index 42a225bf..d85e0331 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -49,11 +49,11 @@ static volatile MicroBitNoInitMemoryRegion __attribute__ ((section (".noinit"))) #define IS_3_3_V() ((NRF_UICR->REGOUT0 & 7) == 5) -static void disableNFConPins() { - // DMESG("disableNFConPins\n"); +void NFConPins::NFConPins() { + DMESG("disableNFConPins\n"); // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. if (NRF_UICR->NFCPINS || !IS_3_3_V()) { - // DMESG("RESET UICR\n"); + DMESG("RESET UICR\n"); // Enable Flash Writes NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); while (NRF_NVMC->READY == NVMC_READY_READY_Busy) @@ -113,7 +113,7 @@ MicroBit::MicroBit() : bleManager(), ble( &bleManager), #endif - + nfc(), systemTimer(NRF_TIMER1, TIMER1_IRQn), adcTimer(NRF_TIMER2, TIMER2_IRQn), diff --git a/model/MicroBit.h b/model/MicroBit.h index d5f57883..1e832ca1 100644 --- a/model/MicroBit.h +++ b/model/MicroBit.h @@ -104,6 +104,11 @@ DEALINGS IN THE SOFTWARE. */ namespace codal { + class NFConPins { + public: + NFConPins(); + } + class MicroBit : public MicroBitDevice, public CodalComponent { private: @@ -132,7 +137,7 @@ namespace codal MicroBitBLEManager bleManager; BLEDevice *ble; #endif - + NFConPins nfc; NRFLowLevelTimer systemTimer; NRFLowLevelTimer adcTimer; NRFLowLevelTimer capTouchTimer; From 50163b758f53e69694544b2acde066ddbf49dd6a Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 21:41:13 -0800 Subject: [PATCH 13/15] syntax error --- model/MicroBit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/MicroBit.h b/model/MicroBit.h index 1e832ca1..03e3ac7f 100644 --- a/model/MicroBit.h +++ b/model/MicroBit.h @@ -107,7 +107,7 @@ namespace codal class NFConPins { public: NFConPins(); - } + }; class MicroBit : public MicroBitDevice, public CodalComponent { From b3db40753dd2148f4db13d8b52a1a30216d350e2 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 21:42:14 -0800 Subject: [PATCH 14/15] get rid of old code --- model/MicroBit.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index d85e0331..9d19de27 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -149,8 +149,6 @@ MicroBit::MicroBit() : { // Clear our status status = 0; - - disableNFConPins(); // Configure serial port for debugging From 5e43f05e3a662990567171cefda0fc0a962761d4 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Sun, 28 Jan 2024 21:43:51 -0800 Subject: [PATCH 15/15] no return type --- model/MicroBit.cpp | 2 +- model/MicroBit.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/model/MicroBit.cpp b/model/MicroBit.cpp index 9d19de27..49610b69 100644 --- a/model/MicroBit.cpp +++ b/model/MicroBit.cpp @@ -49,7 +49,7 @@ static volatile MicroBitNoInitMemoryRegion __attribute__ ((section (".noinit"))) #define IS_3_3_V() ((NRF_UICR->REGOUT0 & 7) == 5) -void NFConPins::NFConPins() { +NFConPins::NFConPins() { DMESG("disableNFConPins\n"); // Ensure NFC pins are configured as GPIO. If not, update the non-volatile UICR. if (NRF_UICR->NFCPINS || !IS_3_3_V()) { diff --git a/model/MicroBit.h b/model/MicroBit.h index 03e3ac7f..dc8ec058 100644 --- a/model/MicroBit.h +++ b/model/MicroBit.h @@ -105,8 +105,7 @@ DEALINGS IN THE SOFTWARE. namespace codal { class NFConPins { - public: - NFConPins(); + public: NFConPins(); }; class MicroBit : public MicroBitDevice, public CodalComponent