summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/pybmodule.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-03-17 14:04:19 +0000
committerDamien George <damien.p.george@gmail.com>2014-03-17 14:04:19 +0000
commitb92d3e1fded0ad335f7a2c8c0f5dea91d258bae0 (patch)
treeada1f189c3fefe4f4fe3150cdb4b0d62b6162aa1 /stmhal/pybmodule.c
parent9e5ea4d768da3273b6d060cceffcc858e1c4827d (diff)
downloadmicropython-b92d3e1fded0ad335f7a2c8c0f5dea91d258bae0.tar.gz
micropython-b92d3e1fded0ad335f7a2c8c0f5dea91d258bae0.zip
stmhal: Add fatfs support, working with flash and SD card.
Diffstat (limited to 'stmhal/pybmodule.c')
-rw-r--r--stmhal/pybmodule.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/stmhal/pybmodule.c b/stmhal/pybmodule.c
index a6899d7f2d..b6b269b065 100644
--- a/stmhal/pybmodule.c
+++ b/stmhal/pybmodule.c
@@ -4,9 +4,6 @@
#include <stm32f4xx_hal.h>
#include "misc.h"
-#if 0
-#include "ff.h"
-#endif
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
@@ -22,10 +19,10 @@
#include "usrsw.h"
#include "rtc.h"
#include "usart.h"
+#include "storage.h"
#include "sdcard.h"
#if 0
#include "servo.h"
-#include "storage.h"
#include "usb.h"
#include "accel.h"
#include "i2c.h"
@@ -33,6 +30,7 @@
#include "audio.h"
#endif
#include "pybmodule.h"
+#include "ff.h"
// get lots of info about the board
STATIC mp_obj_t pyb_info(void) {
@@ -84,7 +82,6 @@ STATIC mp_obj_t pyb_info(void) {
printf(" 1=%lu 2=%lu m=%lu\n", info.num_1block, info.num_2block, info.max_block);
}
-#if 0
// free space on flash
{
DWORD nclst;
@@ -92,7 +89,6 @@ STATIC mp_obj_t pyb_info(void) {
f_getfree("0:", &nclst, &fatfs);
printf("LFS free: %u bytes\n", (uint)(nclst * fatfs->csize * 512));
}
-#endif
return mp_const_none;
}
@@ -101,9 +97,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(pyb_info_obj, pyb_info);
// sync all file systems
STATIC mp_obj_t pyb_sync(void) {
-#if 0
storage_flush();
-#endif
return mp_const_none;
}