Skip to content

Commit c27e5c4

Browse files
Alex Marchdpgeorge
Alex March
authored andcommitted
cc3200: FatFS configuration moved to the library folder.
Port specific settinigs defined in mpconfigport. FreeRTOS and semphr headers added to define SemaphoreHandle_t for the SYNC_T.
1 parent 748509a commit c27e5c4

File tree

5 files changed

+27
-384
lines changed

5 files changed

+27
-384
lines changed

cc3200/fatfs/src/diskio.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
#include "py/mpconfig.h"
1313
#include "py/runtime.h"
1414
#include "py/obj.h"
15-
#include "diskio.h" /* FatFs lower layer API */
15+
#include "lib/fatfs/ff.h"
16+
#include "lib/fatfs/diskio.h" /* FatFs lower layer API */
1617
#include "sflash_diskio.h" /* Serial flash disk IO API */
1718
#include "sd_diskio.h" /* SDCARD disk IO API */
1819
#include "inc/hw_types.h"
@@ -22,7 +23,6 @@
2223
#include "prcm.h"
2324
#include "pybrtc.h"
2425
#include "timeutils.h"
25-
#include "ff.h"
2626
#include "pybsd.h"
2727
#include "moduos.h"
2828

@@ -35,7 +35,7 @@ DSTATUS disk_status (
3535
BYTE pdrv /* Physical drive nmuber to identify the drive */
3636
)
3737
{
38-
if (pdrv == FLASH) {
38+
if (pdrv == PD_FLASH) {
3939
return sflash_disk_status();
4040
} else {
4141
os_fs_mount_t *mount_obj;
@@ -57,7 +57,7 @@ DSTATUS disk_initialize (
5757
BYTE pdrv /* Physical drive nmuber to identify the drive */
5858
)
5959
{
60-
if (pdrv == FLASH) {
60+
if (pdrv == PD_FLASH) {
6161
if (RES_OK != sflash_disk_init()) {
6262
return STA_NOINIT;
6363
}
@@ -84,7 +84,7 @@ DRESULT disk_read (
8484
UINT count /* Number of sectors to read */
8585
)
8686
{
87-
if (pdrv == FLASH) {
87+
if (pdrv == PD_FLASH) {
8888
return sflash_disk_read(buff, sector, count);
8989
} else {
9090
os_fs_mount_t *mount_obj;
@@ -115,7 +115,7 @@ DRESULT disk_write (
115115
UINT count /* Number of sectors to write */
116116
)
117117
{
118-
if (pdrv == FLASH) {
118+
if (pdrv == PD_FLASH) {
119119
return sflash_disk_write(buff, sector, count);
120120
} else {
121121
os_fs_mount_t *mount_obj;
@@ -147,7 +147,7 @@ DRESULT disk_ioctl (
147147
void *buff /* Buffer to send/receive control data */
148148
)
149149
{
150-
if (pdrv == FLASH) {
150+
if (pdrv == PD_FLASH) {
151151
switch (cmd) {
152152
case CTRL_SYNC:
153153
return sflash_disk_flush();

cc3200/fatfs/src/diskio.h

-64
This file was deleted.

cc3200/fatfs/src/ffconf.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#include <string.h>
2828

2929
#include "py/mpstate.h"
30-
#include "ff.h"
31-
#include "ffconf.h"
32-
#include "diskio.h"
30+
#include "lib/fatfs/ff.h"
31+
#include "lib/fatfs/ffconf.h"
32+
#include "lib/fatfs/diskio.h"
3333
#include "moduos.h"
3434

3535
#if _FS_RPATH
@@ -65,7 +65,7 @@ int ff_get_ldnumber (const TCHAR **path) {
6565
}
6666

6767
if (check_path(path, "/flash", 6)) {
68-
return FLASH;
68+
return PD_FLASH;
6969
}
7070
else {
7171
for (mp_uint_t i = 0; i < MP_STATE_PORT(mount_obj_list).len; i++) {
@@ -80,7 +80,7 @@ int ff_get_ldnumber (const TCHAR **path) {
8080
}
8181

8282
void ff_get_volname(BYTE vol, TCHAR **dest) {
83-
if (vol == FLASH) {
83+
if (vol == PD_FLASH) {
8484
memcpy(*dest, "/flash", 6);
8585
*dest += 6;
8686
} else {

0 commit comments

Comments
 (0)