Skip to content

Commit ac06a54

Browse files
authored
Merge pull request #46 from tmobile/rebase_flash_ctrl_missing
fixes missing Gecko FLASH CTRL device at run time.
2 parents e5e3204 + 97c8bab commit ac06a54

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

samples/tmo_shell/src/tmo_shell.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ const struct device *gecko_flash_dev = NULL;
9090
#error Unsupported flash driver
9191
#endif
9292

93+
#define GECKO_FLASH_DEVICE DT_NODE_FULL_NAME(DT_INST(0, silabs_gecko_flash_controller))
94+
9395
extern const struct device *ext_flash_dev;
9496
extern const struct device *gecko_flash_dev;
9597
extern int get_gecko_fw_version(void);
@@ -2359,13 +2361,13 @@ void tmo_shell_main (void)
23592361
printf("SPI NOR external flash driver %s ready!\n", FLASH_DEVICE);
23602362
}
23612363

2362-
gecko_flash_dev = device_get_binding("FLASH_CTRL");
2363-
if (!gecko_flash_dev) {
2364-
printf("\nFLASH_CTRL: Device driver FLASH_CTRL not found\n");
2365-
}
2366-
else {
2367-
printf("Gecko flash driver FLASH_CTRL ready!\n");
2368-
}
2364+
gecko_flash_dev = device_get_binding(GECKO_FLASH_DEVICE);
2365+
if (!gecko_flash_dev) {
2366+
printf("\nGECKO_FLASH_DEVICE : Device driver GECKO_FLASH_DEVICE not found\n");
2367+
}
2368+
else {
2369+
printf("Gecko flash driver GECKO_FLASH_DEVICE ready!\n");
2370+
}
23692371

23702372
// mount the flash file system
23712373
mountfs();

0 commit comments

Comments
 (0)