Skip to content

Commit dc1a35e

Browse files
committed
[dfs,fatfs] Modify code to adapt Arduino build process
[dfs] Put code under macro "RT_USING_DFS" [finsh] Put code under macro "RT_USING_FINSH"
1 parent 8bb929d commit dc1a35e

37 files changed

+141
-67
lines changed

src/components/dfs/filesystems/elmfat/dfs_elm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* 2017-05-26 Urey fix f_mount error when mount more fats
1818
*/
1919

20-
#include <rtthread.h>
20+
#include "include/rtthread.h"
2121
#include "ffconf.h"
2222
#include "ff.h"
2323
#include <string.h>
@@ -26,8 +26,8 @@
2626
/* ELM FatFs provide a DIR struct */
2727
#define HAVE_DIR_STRUCTURE
2828

29-
#include <dfs_fs.h>
30-
#include <dfs_file.h>
29+
#include "components/dfs/include/dfs_fs.h"
30+
#include "components/dfs/include/dfs_file.h"
3131

3232
static rt_device_t disk[_VOLUMES] = {0};
3333

src/components/dfs/filesystems/elmfat/ff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6058,7 +6058,7 @@ int f_printf (
60586058
#endif /* !_FS_READONLY */
60596059
#endif /* _USE_STRFUNC */
60606060

6061-
#include <rtthread.h>
6061+
#include "include/rtthread.h"
60626062
#if _VOLUMES > 1
60636063
int elm_get_vol(FATFS *fat)
60646064
{

src/components/dfs/filesystems/elmfat/ff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
extern "C" {
2626
#endif
2727

28-
#include <rtthread.h>
28+
#include "include/rtthread.h"
2929
#include "integer.h" /* Basic integer types */
3030
#include "ffconf.h" /* FatFs configuration options */
3131

src/components/dfs/filesystems/elmfat/option/ccfile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include <rtthread.h>
1+
#include "include/rtthread.h"
22
#include <string.h>
3-
#include <dfs_posix.h>
3+
#include "components/dfs/include/dfs_posix.h"
44

55
#ifndef GBK2UNI_FILE
66
#define GBK2UNI_FILE "/resource/gbk2uni.tbl"

src/components/dfs/filesystems/elmfat/option/unicode.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
#if _USE_LFN != 0
44

55
#if _CODE_PAGE == 932 /* Japanese Shift_JIS */
6-
#include "cc932.c"
6+
#include "cc932.h"
77
#elif _CODE_PAGE == 936 /* Simplified Chinese GBK */
8-
#include "cc936.c"
8+
#include "cc936.h"
99
#elif _CODE_PAGE == 949 /* Korean */
10-
#include "cc949.c"
10+
#include "cc949.h"
1111
#elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */
12-
#include "cc950.c"
12+
#include "cc950.h"
1313
#else /* Single Byte Character-Set */
14-
#include "ccsbcs.c"
14+
#include "ccsbcs.h"
1515
#endif
1616

1717
#endif

src/components/dfs/include/dfs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include <string.h>
1818

1919
#include <time.h>
20-
#include <rtthread.h>
21-
#include <rtdevice.h>
20+
#include "include/rtthread.h"
21+
// #include "include/rtdevice.h"
2222

2323
#ifndef DFS_FILESYSTEMS_MAX
2424
#define DFS_FILESYSTEMS_MAX 2

src/components/dfs/include/dfs_file.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#ifndef __DFS_FILE_H__
1212
#define __DFS_FILE_H__
1313

14-
#include <dfs.h>
15-
#include <dfs_fs.h>
14+
#include "dfs.h"
15+
#include "dfs_fs.h"
1616

1717
#ifdef __cplusplus
1818
extern "C" {

src/components/dfs/include/dfs_fs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifndef __DFS_FS_H__
1212
#define __DFS_FS_H__
1313

14-
#include <dfs.h>
14+
#include "dfs.h"
1515

1616
#ifdef __cplusplus
1717
extern "C" {
@@ -24,7 +24,7 @@ struct dfs_fd;
2424
/* File system operations */
2525
struct dfs_filesystem_ops
2626
{
27-
char *name;
27+
const char *name;
2828
uint32_t flags; /* flags for file system operations */
2929

3030
/* operations for file */

src/components/dfs/include/dfs_poll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#ifndef DFS_POLL_H__
1111
#define DFS_POLL_H__
1212

13-
#include <rtthread.h>
13+
#include "include/rtthread.h"
1414

1515
#ifdef RT_USING_POSIX
1616
#include <sys/time.h> /* for struct timeval */

src/components/dfs/include/dfs_posix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifndef __DFS_POSIX_H__
1616
#define __DFS_POSIX_H__
1717

18-
#include <dfs_file.h>
18+
#include "dfs_file.h"
1919

2020
#ifdef __cplusplus
2121
extern "C" {

0 commit comments

Comments
 (0)