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:
Andrew Tridgell
2013-11-30 20:17:09 +11:00
parent 7d415b0c42
commit 244c3602f2
2 changed files with 17 additions and 0 deletions
+6
View File
@@ -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