Update clock speed.
- Parameters
-
| speed_hz | New clock speed in Hz |
- Returns
- Result indicating success or error
- Note
- Runtime updates not yet supported - new speed takes effect on next begin()
-
To apply immediately: call end() then begin()
Definition at line 356 of file device.cpp.hpp.
356 {
358 return fl::task::Error("Device not initialized");
359 }
360
361
362 pImpl->config.clock_speed_hz = speed_hz;
363
364
365
366
367
368 if (
pImpl->initialized) {
369 FL_LOG_SPI(
"SPI Device: Clock speed updated to " << speed_hz <<
" Hz (will take effect on next begin())");
370 } else {
371 FL_LOG_SPI(
"SPI Device: Clock speed set to " << speed_hz <<
" Hz");
372 }
373
375}
fl::unique_ptr< Impl > pImpl
#define FL_LOG_SPI(...)
Serial Peripheral Interface (SPI) logging Logs SPI configuration, initialization, and transfers.
constexpr nullopt_t nullopt
References FL_LOG_SPI, fl::FL_NO_EXCEPT, fl::nullopt, and pImpl.