Skip to content
Snippets Groups Projects
Commit ea85141f authored by schneider's avatar schneider
Browse files

Merge branch 'issue104-UIError-update-fail' into 'master'

Fix #104 - Add error message to . Added bootloader specific error splash...

Closes #104

See merge request card10/firmware!193
parents 3e9ff447 556b97ca
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,21 @@ void bootloader_display_header(void)
bootloader_display_line(2, CARD10_VERSION, white);
}
void bootloader_display_error(char *errtype, char *line1, char *line2)
{
gfx_clear(&display_screen);
Color red = gfx_color(&display_screen, RED);
Color yellow = gfx_color(&display_screen, YELLOW);
Color white = gfx_color(&display_screen, WHITE);
bootloader_display_line(0, "[FATAL ERROR]", red);
bootloader_display_line(1, errtype, yellow);
bootloader_display_line(2, CARD10_VERSION, white);
bootloader_display_line(3, line1, white);
bootloader_display_line(4, line2, white);
}
/*
* Display a line of text on the display.
*/
......
......@@ -5,6 +5,7 @@
/* Display */
void bootloader_display_init(void);
void bootloader_display_header(void);
void bootloader_display_error(char *errtype, char *line1, char *line2);
void bootloader_display_line(int line, char *string, uint16_t color);
/* USB */
......
......@@ -179,6 +179,9 @@ void flash_partition(void)
data); /* wild cast. not sure if this works */
if (ret != E_NO_ERROR) {
printf("FLC_Write failed with %d\n", ret);
bootloader_display_error(
"Firmware Write", "Firmware not", "updated."
);
while (1)
;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment