CuVoodoo STM32F1 firmware template
Macros | Functions | Variables
busvoodoo_rs485.c File Reference

BusVoodoo RS-485 mode (code) More...

Go to the source code of this file.

Macros

#define BUSVOODOO_RS485_USART   2
 USART peripheral.
 
#define BUSVOODOO_RS485_RX_TIMER   2
 timer ID to capture RX edges
 
#define BUSVOODOO_RS485_RX_CHANNEL   4
 channel ID used as input capture to capture RX edges
 

Functions

static void busvoodoo_rs485_drive_enable (void)
 enable RS-485 transceiver driver to allow transmitting
 
static void busvoodoo_rs485_drive_disable (void)
 enable RS-485 transceiver driver to allow transmitting
 
static void busvoodoo_rs485_receive_enable (void)
 enable RS-485 transceiver received to allow receiving
 
static void busvoodoo_rs485_receive_disable (void)
 enable RS-485 transceiver received to allow receiving
 
static bool busvoodoo_rs485_setup (char **prefix, const char *line)
 setup RS-485 mode More...
 
static void busvoodoo_rs485_exit (void)
 exit RS-485 mode
 

Variables

static const struct busvoodoo_uart_generic_specific_t busvoodoo_uart_generic_rs485
 RS-485 specific methods that will be called by the generic methods.
 
const struct busvoodoo_mode_t busvoodoo_rs485_mode
 RS-485 mode interface definition. More...
 

Detailed Description

BusVoodoo RS-485 mode (code)

Author
King Kévin kingk.nosp@m.evin.nosp@m.@cuvo.nosp@m.odoo.nosp@m..info
Date
2018
Note
peripherals used: USART USART peripheral used for RS-485/422 communication, using a RS-485/422 transceiver

Definition in file busvoodoo_rs485.c.

Function Documentation

◆ busvoodoo_rs485_setup()

static bool busvoodoo_rs485_setup ( char **  prefix,
const char *  line 
)
static

setup RS-485 mode

Parameters
[out]prefixterminal prompt prefix
[in]lineterminal prompt line to configure mode
Returns
if setup is complete

Definition at line 116 of file busvoodoo_rs485.c.

Variable Documentation

◆ busvoodoo_rs485_mode

const struct busvoodoo_mode_t busvoodoo_rs485_mode
Initial value:
= {
.name = "rs485",
.description = "Recommended Standard 485/422",
.full_only = true,
}
static bool busvoodoo_rs485_setup(char **prefix, const char *line)
setup RS-485 mode
#define busvoodoo_uart_generic_commands_nb
number of commands supported by the generic UART mode
const struct menu_command_t busvoodoo_uart_generic_commands[busvoodoo_uart_generic_commands_nb]
commands supported by the generic UART mode
static void busvoodoo_rs485_exit(void)
exit RS-485 mode

RS-485 mode interface definition.

Definition at line 159 of file busvoodoo_rs485.c.