1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 09:15:38 +03:00

DMA used when reading/writing from SD card to SDRAM

This commit is contained in:
Damjan Adamic 2016-02-29 23:04:55 +01:00
parent d7909e7dbc
commit c5e8dcff38

View file

@ -129,7 +129,8 @@ DRESULT disk_read (
return RES_NOTRDY;
}
if ((DWORD)buff < 0x20000000 || (DWORD)buff >= 0x20030000 || ((DWORD)buff & 3)) {
if ((DWORD)buff < 0x20000000 /*|| (DWORD)buff >= 0x20030000*/ || ((DWORD)buff & 3)) {
TRACE("disk_read bad alignment (%p)", buff);
while(count--) {
res = disk_read(drv, (BYTE *)scratch, sector++, 1);
@ -207,7 +208,8 @@ DRESULT disk_write (
if (SD_Detect() != SD_PRESENT)
return(RES_NOTRDY);
if ((DWORD)buff < 0x20000000 || (DWORD)buff >= 0x20030000 || ((DWORD)buff & 3)) {
if ((DWORD)buff < 0x20000000 /*|| (DWORD)buff >= 0x20030000*/ || ((DWORD)buff & 3)) {
TRACE("disk_write bad alignment (%p)", buff);
while(count--) {
memcpy(scratch, buff, BLOCK_SIZE);