Horus disk_ioctl() fixed: CTRL_SYNC was missing, default return is now RES_OK;

This commit is contained in:
Damjan Adamic
2016-04-17 12:55:01 +02:00
parent 403471d869
commit 41a5af5a6e
2 changed files with 17 additions and 1 deletions
+10
View File
@@ -283,6 +283,16 @@ DRESULT disk_ioctl (
*(WORD*)buff = SDCardInfo.CardBlockSize;
res = RES_OK;
break;
case CTRL_SYNC:
while (SD_GetStatus() == SD_TRANSFER_BUSY); /* Complete pending write process (needed at _FS_READONLY == 0) */
res = RES_OK;
break;
default:
res = RES_OK;
break;
}
return res;
+7 -1
View File
@@ -30,8 +30,14 @@ if(MSVC)
include_directories(${PROJECT_SOURCE_DIR}/winbuild C:/Programs/pthreads/Pre-built.2/include C:/Programs/msinttypes C:/Programs/dirent/include)
target_link_libraries(${SIMULATOR_TARGET} PRIVATE C:/Programs/pthreads/Pre-built.2/lib/pthreadVC2.lib)
else()
if (${CMAKE_VERSION} VERSION_LESS 3.1.0})
set(COMMON_CPP_FLAGS "${COMMON_FLAGS} -std=gnu++11")
message("USING -std=gnu++11")
else()
set(COMMON_CPP_FLAGS ${COMMON_FLAGS})
endif()
set(CMAKE_C_FLAGS_DEBUG "${COMMON_FLAGS} -g -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_FLAGS} -g -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CPP_FLAGS} -g -O0")
endif()
if(NOT WIN32)