latch the CS select
| 263 | |
| 264 | // latch the CS select |
| 265 | void inline select() FL_NOEXCEPT __attribute__((always_inline)) { |
| 266 | if(mPSelect != nullptr) { |
| 267 | mPSelect->select(); |
| 268 | } |
| 269 | if (mInitialized) { |
| 270 | u32 clock_hz = F_CPU / _SPI_CLOCK_DIVIDER; |
| 271 | if (clock_hz > 24000000) clock_hz = 24000000; |
| 272 | ::SPI.beginTransaction(SPISettings(clock_hz, MSBFIRST, SPI_MODE0)); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | // release the CS select |
| 277 | void inline release() FL_NOEXCEPT __attribute__((always_inline)) { |