Open maclobdell opened 7 years ago
Good point, what if we added frequency as a config option and used that here? That way specific targets can override the default with their minimum frequency.
Would be consistent with serial and platform.default-serial-baud-rate.
Admittedly, I haven't done the research on this, but for many microcontrollers, 40MHz on the SPI exceeds the limits. Perhaps a default value of something lower that is more clearly configurable, or perhaps the accompanying example application can pass in a lower default value that will be more compatible across platforms.
@param freq Clock speed of the SPI bus (defaults to 40MHz) */
SPIFBlockDevice(PinName mosi, PinName miso, PinName sclk, PinName csel, int freq=40000000);