summaryrefslogtreecommitdiff
path: root/cc3200/mods/pybsd.c
diff options
context:
space:
mode:
authorDaniel Campora <daniel@wipy.io>2015-04-10 21:02:07 +0200
committerDaniel Campora <daniel@wipy.io>2015-04-11 13:35:05 +0200
commit6e25d955f489ee3446c5af10ea28b1f9038a733b (patch)
tree4eb6d4b2ee4af0646ee0a2aeebbabfbcce596bbe /cc3200/mods/pybsd.c
parentd35ac956d1710cb688c4ee4d56e19a3ec1c34bbc (diff)
cc3200: Enable long filename support in FatFS.
This has implications all over the place. I have to admit that you can instantly see that usability improves, but it costs 3K. At the same time I took the oportunity to rename the '/SFLASH' drive to '/flash' which improves compatibility with the pyboard.
Diffstat (limited to 'cc3200/mods/pybsd.c')
-rw-r--r--cc3200/mods/pybsd.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/cc3200/mods/pybsd.c b/cc3200/mods/pybsd.c
index daac95301..c5444b591 100644
--- a/cc3200/mods/pybsd.c
+++ b/cc3200/mods/pybsd.c
@@ -148,13 +148,13 @@ STATIC mp_obj_t pybsd_enable (mp_obj_t self_in) {
// do the init first
pybsd_init (self);
- // try to mount the sd card on /SD
- if (FR_OK != f_mount(self->fatfs, "/SD", 1)) {
+ // try to mount the sd card on /sd
+ if (FR_OK != f_mount(self->fatfs, "/sd", 1)) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed));
}
- mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_SD));
- mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_SD_slash_LIB));
+ mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_sd));
+ mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_sd_slash_lib));
// register it with the sleep module
pybsleep_add ((const mp_obj_t)&pybsd_obj, (WakeUpCB_t)pybsd_init);
@@ -172,10 +172,10 @@ STATIC mp_obj_t pybsd_disable (mp_obj_t self_in) {
if (self->enabled) {
self->enabled = false;
// unmount the sd card
- f_mount (NULL, "/SD", 1);
+ f_mount (NULL, "/sd", 1);
// remove sd paths from mp_sys_path
- mp_obj_list_remove(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_SD));
- mp_obj_list_remove(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_SD_slash_LIB));
+ mp_obj_list_remove(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_sd));
+ mp_obj_list_remove(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_sd_slash_lib));
// disable the peripheral
MAP_PRCMPeripheralClkDisable(PRCM_SDHOST, PRCM_RUN_MODE_CLK | PRCM_SLP_MODE_CLK);
@@ -186,8 +186,8 @@ STATIC mp_obj_t pybsd_disable (mp_obj_t self_in) {
// unregister it with the sleep module
pybsleep_remove (self);
- // change the drive in case it was /SD
- f_chdrive("/SFLASH");
+ // change the drive in case it was /sd
+ f_chdrive("/flash");
}
return mp_const_none;
}