Merge pull request #1373 from heyuanjie87/master

[imx rt]mdk memcpy导致奇地址崩溃
This commit is contained in:
Bernard Xiong 2018-04-20 18:14:29 +08:00 committed by GitHub
commit 58c1d721f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -357,7 +357,7 @@ static void _mmc_request(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req)
if (buf) if (buf)
{ {
MMCSD_DGB(" write(data->buf to buf) "); MMCSD_DGB(" write(data->buf to buf) ");
memcpy(buf, data->buf, fsl_data.blockSize * fsl_data.blockCount); rt_memcpy(buf, data->buf, fsl_data.blockSize * fsl_data.blockCount);
fsl_data.txData = (uint32_t const *)buf; fsl_data.txData = (uint32_t const *)buf;
} }
else else
@ -401,7 +401,7 @@ static void _mmc_request(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req)
if (fsl_data.rxData) if (fsl_data.rxData)
{ {
MMCSD_DGB("read copy buf to data->buf "); MMCSD_DGB("read copy buf to data->buf ");
memcpy(data->buf, buf, fsl_data.blockSize * fsl_data.blockCount); rt_memcpy(data->buf, buf, fsl_data.blockSize * fsl_data.blockCount);
} }
rt_free_align(buf); rt_free_align(buf);