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)
157157 } else if (div >= SPI_CLOCK_DIV8) {
158158 clockFreq = NRF_SPIM_FREQ_8M;
159159 } else {
160- #ifdef NRF52840_XXAA
161- if ( _spim.drv_inst_idx == NRFX_SPIM3_INST_IDX )
160+ if ( _spim.p_reg == NRF_SPIM3 )
162161 {
163162 if (div >= SPI_CLOCK_DIV4) {
164163 clockFreq = NRF_SPIM_FREQ_16M;
165164 }else {
166165 clockFreq = NRF_SPIM_FREQ_32M;
167166 }
168167 }else
169- #endif
170168 {
171169 clockFreq = NRF_SPIM_FREQ_8M;
172170 }
@@ -234,7 +232,7 @@ void SPIClass::detachInterrupt() {
234232
235233#if SPI_INTERFACES_COUNT > 0
236234// 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);
238236#endif
239237
240238#if SPI_INTERFACES_COUNT > 1
You can’t perform that action at this time.
0 commit comments