BV UART: add pinout
This commit is contained in:
parent
cd289dd537
commit
95c64eb081
|
@ -210,17 +210,15 @@ static bool busvoodoo_uart_setup(char** prefix, const char* line)
|
|||
break;
|
||||
}
|
||||
usart_enable(USART(BUSVOODOO_USART_ID)); // enable USART
|
||||
printf("I/O pinout:\n");
|
||||
printf("+----- -------+\n");
|
||||
printf("|xx xx RX 3V3 GND|\n");
|
||||
printf("|xx xx TX lV 5V |\n");
|
||||
printf("+----------------+\n");
|
||||
led_off(); // disable LED because there is no activity
|
||||
busvoodoo_uart_setting = BUSVOODOO_UART_SETTING_NONE; // restart settings next time
|
||||
*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
|
||||
const char* pinout_io[10] = {"GND", "3V3", "5V", "lV", "Rx", "Tx", NULL, NULL}; // HiZ mode pinout
|
||||
for (uint8_t i=0; i<LENGTH(pinout_io) && i<LENGTH(busvoodoo_global_pinout_io); i++) {
|
||||
busvoodoo_global_pinout_io[i] = pinout_io[i]; // set pin names
|
||||
}
|
||||
busvoodoo_oled_text_pinout(pinout_io, true); // set pinout on display
|
||||
busvoodoo_oled_update(); // update display to show text and pinout
|
||||
complete = true; // configuration is complete
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue