mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use.
This commit is contained in:
@@ -131,6 +131,13 @@ void SetupHardware(void)
|
||||
Dataflash_Init();
|
||||
USB_Init();
|
||||
|
||||
/* Check if the Dataflash is working, abort if not */
|
||||
if (!(DataflashManager_CheckDataflashOperation()))
|
||||
{
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
||||
for(;;);
|
||||
}
|
||||
|
||||
/* Clear Dataflash sector protections, if enabled */
|
||||
DataflashManager_ResetDataflashProtections();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user