mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2025-07-31 20:31:05 +00:00
update
This commit is contained in:
parent
3aed7cffe0
commit
18fd944164
8 changed files with 18 additions and 22 deletions
|
|
@ -223,20 +223,20 @@ s8 sdio_write_blocks(uint32_t sector, const uint8_t *buffer, uint32_t count) {
|
|||
//-----
|
||||
s8 sdio_sd_init(void) {
|
||||
if (sdio_status != SDIO_SD_OK) {
|
||||
SdioHostAdapter.AdmaDescTbl = gAdmaTbls;
|
||||
if (sdio_status <= SDIO_INIT_FAIL)
|
||||
sdio_init_host();
|
||||
if (sdio_status != SDIO_INIT_OK) {
|
||||
return -1;
|
||||
}
|
||||
DBG_SDIO_INFO("Init sd card.\n");
|
||||
SdioHostAdapter.AdmaDescTbl = gAdmaTbls;
|
||||
if (HalSdioHostOp.HalSdioHostInitCard(&SdioHostAdapter)) {
|
||||
return -1;
|
||||
}
|
||||
sdio_status = SDIO_SD_OK;
|
||||
if (HalSdioHostOp.HalSdioHostChangeSdClock(&SdioHostAdapter,
|
||||
// SD_CLK_20_8MHZ) != HAL_OK)
|
||||
SD_CLK_41_6MHZ) != HAL_OK)
|
||||
SD_CLK_20_8MHZ) != HAL_OK)
|
||||
// SD_CLK_41_6MHZ) != HAL_OK)
|
||||
DBG_SDIO_INFO("SD card does not support high speed.\n");
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue