Skip to content

Commit 8464be1

Browse files
committed
Merge pull request adafruit#781 from dhylands/fix-disc
Fix modos.c to compile for the STM32F4Discovery board
2 parents 65dd7bc + f8f963a commit 8464be1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

stmhal/modos.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@ STATIC mp_obj_t os_listdir(uint n_args, const mp_obj_t *args) {
9292
if (path[0] == '/' && path[1] == '\0') {
9393
mp_obj_t dir_list = mp_obj_new_list(0, NULL);
9494
mp_obj_list_append(dir_list, MP_OBJ_NEW_QSTR(MP_QSTR_flash));
95+
#if MICROPY_HW_HAS_SDCARD
9596
if (sdcard_is_present()) { // TODO this is not the correct logic to check for /sd
9697
mp_obj_list_append(dir_list, MP_OBJ_NEW_QSTR(MP_QSTR_sd));
9798
}
99+
#endif
98100
return dir_list;
99101
}
100102

0 commit comments

Comments
 (0)