File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,7 @@ Application can read write files using standard system calls.
15
15
16
16
See application example for more information.
17
17
18
+ SPI Flash
19
+ =========
20
+
21
+ .. include :: /inc/spifs.inc
Original file line number Diff line number Diff line change
1
+ /*
2
+ * spifs.h
3
+ *
4
+ */
5
+
6
+ #ifndef INC_SPIFS_H_
7
+ #define INC_SPIFS_H_
8
+
9
+ /**
10
+ * SPI Flash status
11
+ */
12
+ enum sfstat_e {
13
+ SF_STAT_NOTENABLED ,/**< SPI Flash not enabled (Either not found or Initialization error) */
14
+ SF_STAT_ENABLED , /**< SPI Flash enabled but not mounted (Filesystem mount issue, Try spifs_enable() again */
15
+ SF_STAT_MOUNTED , /**< SPI Flash enabled and filesystem is mounted successfully */
16
+ };
17
+
18
+ /**
19
+ * Enable SPI Flash and mount LFS filesystem
20
+ * @param gpio_cs [in] GPIO number connected to SPI chip select
21
+ * @param speed [in] SPI Speed in KHz (max 10000 KHz)
22
+ * @param mode [in] SPI mode
23
+ * @return 0 on success, negative value on failure
24
+ */
25
+ int spifs_enable (int gpio_cs , unsigned int speed , int mode );
26
+
27
+ /**
28
+ * Disable SPI Flash and unmount LFS filesystem
29
+ * @return 0 on success, negative value on failure
30
+ */
31
+ int spifs_disable (void );
32
+
33
+ /**
34
+ * Get status of SPI Flash
35
+ * @return SPI Flash status see @ref sfstat_e
36
+ */
37
+ int spifs_getstatus (void );
38
+
39
+ #endif /* INC_SPIFS_H_ */
You can’t perform that action at this time.
0 commit comments