Fix modos.c to compile for the STM32F4Discovery board (which doesn't have an sdcard)

pull/781/head
Dave Hylands 2014-08-01 08:10:41 -07:00
rodzic 65dd7bc13d
commit f8f963a14a
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -92,9 +92,11 @@ STATIC mp_obj_t os_listdir(uint n_args, const mp_obj_t *args) {
if (path[0] == '/' && path[1] == '\0') {
mp_obj_t dir_list = mp_obj_new_list(0, NULL);
mp_obj_list_append(dir_list, MP_OBJ_NEW_QSTR(MP_QSTR_flash));
#if MICROPY_HW_HAS_SDCARD
if (sdcard_is_present()) { // TODO this is not the correct logic to check for /sd
mp_obj_list_append(dir_list, MP_OBJ_NEW_QSTR(MP_QSTR_sd));
}
#endif
return dir_list;
}