File tree 7 files changed +19
-5
lines changed
variants/ARDUINO_NANO33BLE
7 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ void arduino::MbedSPI::end() {
59
59
60
60
#if DEVICE_SPI > 0
61
61
arduino::MbedSPI SPI (SPI_MISO, SPI_MOSI, SPI_SCK);
62
- #elif DEVICE_SPI > 1
62
+ #endif
63
+ #if DEVICE_SPI > 1
63
64
arduino::MbedSPI SPI1 (SPI_MISO1, SPI_MOSI1, SPI_SCK1);
64
65
#endif
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ class MbedSPI : public SPIClass
38
38
39
39
#if DEVICE_SPI > 0
40
40
extern arduino::MbedSPI SPI;
41
- #elif DEVICE_SPI > 1
41
+ #endif
42
+ #if DEVICE_SPI > 1
42
43
extern arduino::MbedSPI SPI1;
43
44
#endif
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ void arduino::MbedI2C::onRequest(void(*)(void)) {}
104
104
105
105
#if DEVICE_I2C > 0
106
106
arduino::MbedI2C Wire (I2C_SDA, I2C_SCL);
107
- #elif DEVICE_I2C > 1
107
+ #endif
108
+ #if DEVICE_I2C > 1
108
109
arduino::MbedI2C Wire1 (I2C_SDA1, I2C_SCL1);;
109
110
#endif
Original file line number Diff line number Diff line change @@ -68,9 +68,9 @@ class MbedI2C : public HardwareI2C
68
68
69
69
#if DEVICE_I2C > 0
70
70
extern arduino::MbedI2C Wire;
71
+ #endif
71
72
#if DEVICE_I2C > 1
72
73
extern arduino::MbedI2C Wire1;
73
74
#endif
74
- #endif
75
75
76
76
typedef arduino::MbedI2C TwoWire;
Original file line number Diff line number Diff line change 11
11
-D__CORTEX_M4
12
12
-DDEVICE_ANALOGIN=1
13
13
-DDEVICE_FLASH=1
14
- -DDEVICE_I2C=1
14
+ -DDEVICE_I2C=2
15
15
-DDEVICE_I2C_ASYNCH=1
16
16
-DDEVICE_INTERRUPTIN=1
17
17
-DDEVICE_ITM=1
Original file line number Diff line number Diff line change @@ -78,6 +78,9 @@ static const uint8_t SCK = PIN_SPI_SCK;
78
78
#define PIN_WIRE_SDA1 (30u)
79
79
#define PIN_WIRE_SCL1 (31u)
80
80
81
+ #define PIN_ENABLE_SENSORS_3V3 (32u)
82
+ #define PIN_ENABLE_I2C_PULLUP (33u)
83
+
81
84
#define PIN_INT_APDS (26u)
82
85
83
86
// PDM Interfaces
Original file line number Diff line number Diff line change @@ -66,6 +66,14 @@ void initVariant() {
66
66
// was being enabled by nrfx_clock_anomaly_132
67
67
CoreDebug->DEMCR = 0 ;
68
68
NRF_CLOCK->TRACECONFIG = 0 ;
69
+
70
+ // FIXME: always enable I2C pullup and power @startup
71
+ // Change for maximum powersave
72
+ pinMode (PIN_ENABLE_SENSORS_3V3, OUTPUT);
73
+ pinMode (PIN_ENABLE_I2C_PULLUP, OUTPUT);
74
+
75
+ digitalWrite (PIN_ENABLE_SENSORS_3V3, HIGH);
76
+ digitalWrite (PIN_ENABLE_I2C_PULLUP, HIGH);
69
77
}
70
78
71
79
#ifdef SERIAL_CDC
You can’t perform that action at this time.
0 commit comments