forked from Ryuzaki-MrL/savemii
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from Xpl0itU/refactor_fatfs
Fix fatfs by not using its cache
- Loading branch information
Showing
43 changed files
with
26,021 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FatFs License | ||
|
||
FatFs has being developped as a personal project of the author, ChaN. It is free from the code anyone else wrote at current release. Following code block shows a copy of the FatFs license document that heading the source files. | ||
|
||
/*----------------------------------------------------------------------------/ | ||
/ FatFs - Generic FAT Filesystem Module Rx.xx / | ||
/-----------------------------------------------------------------------------/ | ||
/ | ||
/ Copyright (C) 20xx, ChaN, all right reserved. | ||
/ | ||
/ FatFs module is an open source software. Redistribution and use of FatFs in | ||
/ source and binary forms, with or without modification, are permitted provided | ||
/ that the following condition is met: | ||
/ | ||
/ 1. Redistributions of source code must retain the above copyright notice, | ||
/ this condition and the following disclaimer. | ||
/ | ||
/ This software is provided by the copyright holder and contributors "AS IS" | ||
/ and any warranties related to this software are DISCLAIMED. | ||
/ The copyright owner or contributors be NOT LIABLE for any damages caused | ||
/ by use of this software. | ||
/----------------------------------------------------------------------------*/ | ||
|
||
Therefore FatFs license is one of the BSD-style licenses, but there is a significant feature. FatFs is mainly intended for embedded systems. In order to extend the usability for commercial products, the redistributions of FatFs in binary form, such as embedded code, binary library and any forms without source code, do not need to include about FatFs in the documentations. This is equivalent to the 1-clause BSD license. Of course FatFs is compatible with the most of open source software licenses include GNU GPL. When you redistribute the FatFs source code with changes or create a fork, the license can also be changed to GNU GPL, BSD-style license or any open source software license that not conflict with FatFs license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "devices.h" | ||
#include "ffconf.h" | ||
#include <stddef.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
int deviceFds[FF_VOLUMES] = {-1, -1}; | ||
const char *devicePaths[FF_VOLUMES] = {NULL, NULL}; | ||
|
||
const char *get_fat_usb_path() { | ||
return devicePaths[DEV_USB_EXT]; | ||
} | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
#include "ffconf.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Definitions of physical drive number for each drive */ | ||
#define DEV_SD 0 | ||
#define DEV_USB_EXT 1 | ||
|
||
#define DEV_SD_NAME "sd" | ||
#define DEV_USB_EXT_NAME "extusb" | ||
|
||
#define SD_PATH "/dev/sdcard01" | ||
#define USB_EXT1_PATH "/dev/usb01" | ||
#define USB_EXT2_PATH "/dev/usb02" | ||
|
||
extern int deviceFds[FF_VOLUMES]; | ||
extern const char *devicePaths[FF_VOLUMES]; | ||
|
||
const char *get_fat_usb_path(); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
Oops, something went wrong.