diff options
author | Andrew Tridgell <tridge@samba.org> | 2013-10-30 09:45:58 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2013-11-30 20:17:09 +1100 |
commit | 244c3602f2959335bfd4ae14c4a25eb06a8355a3 (patch) | |
tree | c59b3cb9f5018ed13ad47ef6ed6241e1aa5db406 /src/drivers/device/spi.cpp | |
parent | 7d415b0c42465bffb79a3c69443e7bf85b59eb26 (diff) | |
download | px4-firmware-244c3602f2959335bfd4ae14c4a25eb06a8355a3.tar.gz px4-firmware-244c3602f2959335bfd4ae14c4a25eb06a8355a3.tar.bz2 px4-firmware-244c3602f2959335bfd4ae14c4a25eb06a8355a3.zip |
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
Diffstat (limited to 'src/drivers/device/spi.cpp')
-rw-r--r-- | src/drivers/device/spi.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/device/spi.cpp b/src/drivers/device/spi.cpp index fa6b78d64..fed6c312c 100644 --- a/src/drivers/device/spi.cpp +++ b/src/drivers/device/spi.cpp @@ -181,4 +181,10 @@ SPI::transfer(uint8_t *send, uint8_t *recv, unsigned len) return OK; } +void +SPI::set_frequency(uint32_t frequency) +{ + _frequency = frequency; +} + } // namespace device |