BV UART: display mode and pinout on OLED display

This commit is contained in:
King Kévin 2018-02-06 12:33:00 +01:00
parent 434c664d5b
commit 86bd6d0978
1 changed files with 6 additions and 1 deletions

View File

@ -33,6 +33,7 @@
#include "print.h" // printing utilities
#include "menu.h" // menu definitions
#include "busvoodoo_global.h" // BusVoodoo definitions
#include "busvoodoo_oled.h" // OLED utilities
#include "busvoodoo_uart.h" // own definitions
/** @defgroup busvoodoo_uart USART peripheral used for UART communication
@ -216,8 +217,12 @@ static bool busvoodoo_uart_setup(char** prefix, const char* line)
printf("+----------------+\n");
led_off(); // disable LED because there is no activity
busvoodoo_uart_setting = BUSVOODOO_UART_SETTING_NONE; // restart settings next time
complete = true; // configuration is complete
*prefix = "UART"; // display mode
busvoodoo_oled_text_left("UART"); // set mode title on OLED display
const char* pins[10] = {NULL, NULL, "Rx", "5V", "GND", NULL, NULL, "Tx", "lV", "3V3"}; // UART without flow control mode pinout
busvoodoo_oled_text_pinout(pins, true); // set pinout on display
busvoodoo_oled_update(); // update display to show text and pinout
complete = true; // configuration is complete
}
break;
default: // unknown case