Skip to content

Commit 1247f25

Browse files
committed
[nRF52] fix builds for Mbed and Zephyr
1 parent 9e801a2 commit 1247f25

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • software/firmware/source/SoftRF/src/platform

software/firmware/source/SoftRF/src/platform/nRF52.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2242,7 +2242,10 @@ static void nRF52_setup()
22422242
}
22432243

22442244
if (nRF52_board == NRF52_LILYGO_TIMPULSE_PLUS) {
2245-
if (nRF52_has_imu == false) {
2245+
#if !defined(EXCLUDE_IMU)
2246+
if (nRF52_has_imu == false)
2247+
#endif
2248+
{
22462249
Wire1.begin();
22472250
}
22482251
if (initSGM41562(Wire1)) {
@@ -3159,7 +3162,11 @@ static void nRF52_fini(int reason)
31593162
pinMode(SOC_GPIO_PIN_TIP_VBAT_EN, INPUT);
31603163
pinMode(SOC_GPIO_PIN_TIP_3V3_EN, INPUT_PULLDOWN); /* LOW ? */
31613164

3165+
#if !defined(EXCLUDE_IMU)
31623166
if (nRF52_has_imu || hw_info.pmu == BMU_SGM41562) {
3167+
#else
3168+
if (hw_info.pmu == BMU_SGM41562) {
3169+
#endif
31633170
Wire1.end();
31643171
}
31653172
break;

0 commit comments

Comments
 (0)