Add connector info to LCD GUI. So TX and RX of UART can be found without looking at the schematic.
This commit is contained in:
parent
835faf7e4e
commit
7d43b4130c
@ -691,6 +691,37 @@ static void gui_update_firmware(struct lcd_menu *menu, enum menu_entry_func_entr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gui_connector_info(struct lcd_menu *menu, enum menu_entry_func_entry entry_type, void *parent)
|
||||||
|
{
|
||||||
|
static void *my_parent;
|
||||||
|
enum button_state button;
|
||||||
|
|
||||||
|
if (entry_type == MENU_ENTRY_FIRST_ENTER) {
|
||||||
|
my_parent = parent;
|
||||||
|
menu_display_clear(menu);
|
||||||
|
|
||||||
|
menu_lcd_output(menu, 0, "2,4: DIGIO[0,1]");
|
||||||
|
menu_lcd_output(menu, 1, "6: DIGIO2 (TX)");
|
||||||
|
menu_lcd_output(menu, 2, "8: DIGIO3 (RX)");
|
||||||
|
menu_lcd_output(menu, 3, "10:3V3 Rest:GND");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (menu_get_button_ready_state(menu)) {
|
||||||
|
/* Buttons are ready. Read button */
|
||||||
|
button = menu_get_button_state(menu);
|
||||||
|
/* Throw away any rotation */
|
||||||
|
(void)menu_get_rotary_delta(menu);
|
||||||
|
|
||||||
|
if (button == BUTTON_SHORT_RELEASED || button == BUTTON_LONG ||
|
||||||
|
button == BUTTON_LONG_RELEASED) {
|
||||||
|
/* Exit menu */
|
||||||
|
menu_entry_dropback(menu, my_parent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static char *overlay_heading = NULL;
|
static char *overlay_heading = NULL;
|
||||||
static char *overlay_text = NULL;
|
static char *overlay_text = NULL;
|
||||||
|
|
||||||
@ -740,6 +771,7 @@ static void gui_menu_root_entry(struct lcd_menu *menu, enum menu_entry_func_entr
|
|||||||
"Error Flags",
|
"Error Flags",
|
||||||
"About",
|
"About",
|
||||||
"Update",
|
"Update",
|
||||||
|
"Connector Info",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
static const menu_func_t root_entry_funcs[] = {
|
static const menu_func_t root_entry_funcs[] = {
|
||||||
@ -749,6 +781,7 @@ static void gui_menu_root_entry(struct lcd_menu *menu, enum menu_entry_func_entr
|
|||||||
gui_menu_err_flags,
|
gui_menu_err_flags,
|
||||||
gui_menu_about,
|
gui_menu_about,
|
||||||
gui_update_firmware,
|
gui_update_firmware,
|
||||||
|
gui_connector_info,
|
||||||
};
|
};
|
||||||
enum button_state push_button;
|
enum button_state push_button;
|
||||||
int16_t rot_delta;
|
int16_t rot_delta;
|
||||||
|
Loading…
Reference in New Issue
Block a user