summaryrefslogtreecommitdiff
path: root/lib/lufa/Projects/Webserver/Lib/FATFs/diskio.c
diff options
context:
space:
mode:
authorCallum Oakley2017-08-19 10:34:45 +0100
committerCallum Oakley2017-08-19 10:34:45 +0100
commita6845036e25c4f4d936dcd12cd0ddedd2894b30e (patch)
treeb23b4e8d9d757aa3c0d42be561572533ae0d126c /lib/lufa/Projects/Webserver/Lib/FATFs/diskio.c
parent84a8aabe5bf8807595f98de44d18f6a31b892edf (diff)
parent7277f09bbadcce120f819132dec8ff7172caacc4 (diff)
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'lib/lufa/Projects/Webserver/Lib/FATFs/diskio.c')
-rw-r--r--lib/lufa/Projects/Webserver/Lib/FATFs/diskio.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/lib/lufa/Projects/Webserver/Lib/FATFs/diskio.c b/lib/lufa/Projects/Webserver/Lib/FATFs/diskio.c
new file mode 100644
index 000000000..b119b1a40
--- /dev/null
+++ b/lib/lufa/Projects/Webserver/Lib/FATFs/diskio.c
@@ -0,0 +1,65 @@
+/*-----------------------------------------------------------------------*/
+/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2007 */
+/*-----------------------------------------------------------------------*/
+/* This is a stub disk I/O module that acts as front end of the existing */
+/* disk I/O modules and attach it to FatFs module with common interface. */
+/*-----------------------------------------------------------------------*/
+
+#include "diskio.h"
+
+/*-----------------------------------------------------------------------*/
+/* Initialize a Drive */
+
+DSTATUS disk_initialize (
+ BYTE drv /* Physical drive number (0..) */
+)
+{
+ return FR_OK;
+}
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Return Disk Status */
+
+DSTATUS disk_status (
+ BYTE drv /* Physical drive number (0..) */
+)
+{
+ return FR_OK;
+}
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read Sector(s) */
+
+DRESULT disk_read (
+ BYTE drv, /* Physical drive number (0..) */
+ BYTE *buff, /* Data buffer to store read data */
+ DWORD sector, /* Sector address (LBA) */
+ BYTE count /* Number of sectors to read (1..128) */
+)
+{
+ DataflashManager_ReadBlocks_RAM(sector, count, buff);
+ return RES_OK;
+}
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Write Sector(s) */
+
+#if _READONLY == 0
+DRESULT disk_write (
+ BYTE drv, /* Physical drive number (0..) */
+ const BYTE *buff, /* Data to be written */
+ DWORD sector, /* Sector address (LBA) */
+ BYTE count /* Number of sectors to write (1..128) */
+)
+{
+ DataflashManager_WriteBlocks_RAM(sector, count, buff);
+ return RES_OK;
+}
+#endif /* _READONLY */
+