Fixed yet another local buffer.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15583 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2022-04-15 07:07:10 +00:00
parent ab0995fca2
commit 6ab7bda104
1 changed files with 3 additions and 4 deletions

View File

@ -729,7 +729,6 @@ error:
*/ */
bool sdc_lld_write_aligned(SDCDriver *sdcp, uint32_t startblk, bool sdc_lld_write_aligned(SDCDriver *sdcp, uint32_t startblk,
const uint8_t *buf, uint32_t blocks) { const uint8_t *buf, uint32_t blocks) {
uint32_t resp[1];
osalDbgCheck(blocks < 0x1000000 / MMCSD_BLOCK_SIZE); osalDbgCheck(blocks < 0x1000000 / MMCSD_BLOCK_SIZE);
@ -755,16 +754,16 @@ bool sdc_lld_write_aligned(SDCDriver *sdcp, uint32_t startblk,
sdcp->sdmmc->IDMABASE0 = (uint32_t)buf; sdcp->sdmmc->IDMABASE0 = (uint32_t)buf;
sdcp->sdmmc->IDMACTRL = SDMMC_IDMA_IDMAEN; sdcp->sdmmc->IDMACTRL = SDMMC_IDMA_IDMAEN;
if (sdc_lld_prepare_write(sdcp, startblk, blocks, resp) == true) if (sdc_lld_prepare_write(sdcp, startblk, blocks, sdcp->resp) == true)
goto error; goto error;
if (sdc_lld_wait_transaction_end(sdcp, blocks, resp) == true) if (sdc_lld_wait_transaction_end(sdcp, blocks, sdcp->resp) == true)
goto error; goto error;
return HAL_SUCCESS; return HAL_SUCCESS;
error: error:
sdc_lld_error_cleanup(sdcp, blocks, resp); sdc_lld_error_cleanup(sdcp, blocks, sdcp->resp);
return HAL_FAILED; return HAL_FAILED;
} }