mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-05 05:21:37 +08:00
SPI: added set_frequency() API
this allows the bus speed to be changed on the fly by device drivers. This is needed for the MPU6000
This commit is contained in:
@@ -101,6 +101,17 @@ protected:
|
||||
*/
|
||||
int transfer(uint8_t *send, uint8_t *recv, unsigned len);
|
||||
|
||||
/**
|
||||
* Set the SPI bus frequency
|
||||
* This is used to change frequency on the fly. Some sensors
|
||||
* (such as the MPU6000) need a lower frequency for setup
|
||||
* registers and can handle higher frequency for sensor
|
||||
* value registers
|
||||
*
|
||||
* @param frequency Frequency to set (Hz)
|
||||
*/
|
||||
void set_frequency(uint32_t frequency);
|
||||
|
||||
/**
|
||||
* Locking modes supported by the driver.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user