27 #include <libopencm3/stm32/gpio.h> 28 #include <libopencm3/stm32/rcc.h> 29 #include <libopencm3/stm32/usart.h> 43 #define BUSVOODOO_RS232_USART 2 47 static const struct busvoodoo_uart_generic_specific_t busvoodoo_uart_generic_rs232 = { 78 bool complete =
false;
91 const char* pinout_io[10] = {
"GND",
"5V",
"3V3",
"LV", NULL, NULL, NULL, NULL, NULL, NULL};
95 const char* pinout_rscan[5] = {
"HV",
"Rx",
"Tx",
"CTS",
"RTS"};
99 const char* pinout[10] = {pinout_rscan[0], pinout_io[0], pinout_rscan[1], pinout_io[2], pinout_rscan[2], pinout_io[4], pinout_rscan[3], pinout_io[6], pinout_rscan[4], pinout_io[8]};
117 .description =
"Recommended Standard 232",
#define USART_TX_PORT(x)
get port for USART transmit pin based on USART identifier
#define RCC_USART(x)
get RCC for USART based on USART identifier
bool busvoodoo_uart_generic_setup(char **prefix, const char *line)
setup generic UART mode
BusVoodoo global definitions and methods (API)
static void busvoodoo_rs232_exit(void)
exit RS-232 mode
void busvoodoo_oled_text_pinout(const char *pins[10], bool io_connector)
draw pin names on bottom (blue) part in display buffer
const char * name
name of the mode (i.e.
#define BUSVOODOO_RS232_EN_PORT
RS-232 pin to enable receiver (active low, pulled up)
#define RCC_USART_PORT(x)
get RCC for USART port based on USART identifier
void busvoodoo_oled_update(void)
update OLED display RAM with current display buffer
const char * busvoodoo_global_pinout_rscan[5]
RS/CAN connector pinout.
global definitions and methods (API)
#define GPIO(x)
get GPIO based on GPIO identifier
static bool busvoodoo_rs232_setup(char **prefix, const char *line)
setup RS-232 mode
void busvoodoo_led_blue_off(void)
switch off blue LED
#define USART_RX_PIN(x)
get pin for USART receive pin based on USART identifier
#define USART_TX_PIN(x)
get pin for USART transmit pin based on USART identifier
#define USART_CTS_PORT(x)
get port for USART CTS pin based on USART identifier
#define RST_USART(x)
get RST for USART based on USART identifier
#define USART(x)
get USART based on USART identifier
void busvoodoo_uart_generic_exit(void)
exit genetic UART mode
const char * busvoodoo_global_pinout_io[10]
I/O connector pinout.
static const struct busvoodoo_uart_generic_specific_t busvoodoo_uart_generic_rs232
RS-232 specific methods that will be called by the generic methods.
#define BUSVOODOO_RS232_EN_PIN
RS-232 pin to enable receiver (active low, pulled up)
#define busvoodoo_uart_generic_commands_nb
number of commands supported by the generic UART mode
#define BUSVOODOO_RS232_USART
USART peripheral.
#define USART_RX_PORT(x)
get port for USART receive pin based on USART identifier
bool busvoodoo_uart_generic_configure(const struct busvoodoo_uart_generic_specific_t *conf)
provide the generic USART with mode specific information
#define USART_RTS_PIN(x)
get pin for USART RTS pin based on USART identifier
const struct busvoodoo_mode_t busvoodoo_rs232_mode
RS-232 mode interface definition.
#define USART_CTS_PIN(x)
get pin for USART CTS pin based on USART identifier
BusVoodoo generic UART mode (API)
printing utilities to replace the large printf from the standard library (API)
void busvoodoo_oled_text_left(char *text)
draw mode text on top (yellow) left side in display buffer
const struct menu_command_t busvoodoo_uart_generic_commands[busvoodoo_uart_generic_commands_nb]
commands supported by the generic UART mode
#define LENGTH(x)
get the length of an array
BusVoodoo RS-232 mode (API)
library to show BusVoodoo mode information on SSD1306 OLED display: name, activity, pinout (API)
BusVoodoo mode interface.
#define USART_RTS_PORT(x)
get port for USART RTS pin based on USART identifier
#define BUSVOODOO_RS232_SHDN_PORT
RS-232 pin to enable transmitter (active high, pulled low)
#define BUSVOODOO_RS232_SHDN_PIN
RS-232 pin to enable transmitter (active high, pulled low)