Changes for menu

* Make Systick a 100us Timer. Millisecond ticks are still untouched.
* LCD now has a 100us resolution tick
* LCD uses 500us delay for waitstate
* Make 'About' menu verbose:
	* Add 3 page menu
	* 1st page: Generic info
	* 2nd page: Version info
	* 3rd page: Uptime in seconds
This commit is contained in:
2020-06-14 13:25:47 +02:00
parent d178910594
commit 43b4fd1e77
6 changed files with 115 additions and 26 deletions

View File

@@ -32,9 +32,9 @@
* @brief Reload value for the systick timer.
*
* This value has to be configured to set the systick to a one milliscond tick interval
* The default value is 168000, which results in a 1ms tick for 168 MHz CPU speed
* The default value is 16800, which results in a 100us tick for 168 MHz CPU speed
*/
#define SYSTICK_RELOAD (168000UL)
#define SYSTICK_RELOAD (16800UL)
/**
* @brief Variable used by the systick_wait_ms function
@@ -52,7 +52,7 @@ extern volatile uint64_t global_tick_ms;
/**
* @brief Wait counter for the display. This must not be used anywhere else
*/
extern volatile uint32_t lcd_tick_ms;
extern volatile uint32_t lcd_tick_100us;
/**
* @brief Setup the Systick timer to generate a 1 ms tick

View File

@@ -66,10 +66,14 @@ void menu_entry_dropback(struct lcd_menu *menu, menu_func_t parent_func);
void menu_entry_enter(struct lcd_menu *menu, menu_func_t entry, bool handle_immediately);
void menu_override_lcd_output(struct lcd_menu *menu, uint8_t row_num, const char *text);
void menu_lcd_output(struct lcd_menu *menu, uint8_t row_num, const char *text);
void menu_list_display(struct menu_list *list, uint32_t top_row, uint32_t bottom_row);
int16_t menu_get_rotary_delta(const struct lcd_menu *menu);
enum button_state menu_get_button_state(const struct lcd_menu *menu);
void menu_list_compute_count(struct menu_list *list);
void menu_list_scroll_down(struct menu_list *list);