File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -157,16 +157,14 @@ void SPIClass::setClockDivider(uint32_t div)
157
157
} else if (div >= SPI_CLOCK_DIV8) {
158
158
clockFreq = NRF_SPIM_FREQ_8M;
159
159
} else {
160
- #ifdef NRF52840_XXAA
161
- if ( _spim.drv_inst_idx == NRFX_SPIM3_INST_IDX )
160
+ if ( _spim.p_reg == NRF_SPIM3 )
162
161
{
163
162
if (div >= SPI_CLOCK_DIV4) {
164
163
clockFreq = NRF_SPIM_FREQ_16M;
165
164
}else {
166
165
clockFreq = NRF_SPIM_FREQ_32M;
167
166
}
168
167
}else
169
- #endif
170
168
{
171
169
clockFreq = NRF_SPIM_FREQ_8M;
172
170
}
@@ -234,7 +232,7 @@ void SPIClass::detachInterrupt() {
234
232
235
233
#if SPI_INTERFACES_COUNT > 0
236
234
// use SPIM3 for highspeed 32Mhz
237
- SPIClass SPI (NRF_SPIM2 , PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI);
235
+ SPIClass SPI (NRF_SPIM3 , PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI);
238
236
#endif
239
237
240
238
#if SPI_INTERFACES_COUNT > 1
You can’t perform that action at this time.
0 commit comments