BV: use OLED display

This commit is contained in:
King Kévin 2018-02-06 12:31:46 +01:00
parent 36569fd7ef
commit 980bc67419
1 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,7 @@
#include "terminal.h" // handle the terminal interface
#include "menu.h" // menu utilities
#include "busvoodoo_global.h" // BusVoodoo definitions
#include "busvoodoo_oled.h" // OLED utilities
#include "busvoodoo_hiz.h" // BusVoodoo HiZ mode
#include "busvoodoo_uart.h" // BusVoodoo UART mode
@ -77,6 +78,8 @@ static void switch_mode(struct busvoodoo_mode_t* mode)
(*busvoodoo_mode->exit)(); // exit current mode
}
busvoodoo_safe_state(); // return to safe state
busvoodoo_oled_clear(); // clear OLED display buffer
busvoodoo_oled_update(); // update OLED display
if (NULL==mode) { // no mode provided
busvoodoo_mode = &busvoodoo_hiz_mode; // use default mode
} else { // mode provided
@ -325,6 +328,10 @@ void main(void)
terminal_process = &process_command; // set central function to process commands
terminal_setup(); // start terminal
// setup OLED display
sleep_ms(10); // wait a bit until the display is ready
busvoodoo_oled_setup(); // setup OLED display
// setup default mode
switch_mode(NULL);