mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Move SDCard SPI clock dividers into target.h (they depend on the bus Hz)
This commit is contained in:
parent
96182c7c07
commit
04d8dd27bf
2 changed files with 6 additions and 2 deletions
|
@ -1181,7 +1181,7 @@ static bool sdcard_completeInit()
|
|||
DESELECT_SDCARD;
|
||||
}
|
||||
|
||||
spiSetDivisor(SDCARD_SPI_INSTANCE, 4);
|
||||
spiSetDivisor(SDCARD_SPI_INSTANCE, SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER);
|
||||
|
||||
sdcard.state = SDCARD_STATE_READY;
|
||||
|
||||
|
@ -1211,7 +1211,7 @@ static bool sdcard_checkInitDone() {
|
|||
bool sdcard_init()
|
||||
{
|
||||
// Max frequency is initially 400kHz
|
||||
spiSetDivisor(SDCARD_SPI_INSTANCE, 128);
|
||||
spiSetDivisor(SDCARD_SPI_INSTANCE, SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER);
|
||||
|
||||
// SDCard wants 1ms minimum delay after power is applied to it
|
||||
delay(1000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue