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.
 

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. More...
 
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 100 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 143 of file busvoodoo_rs485.c.

◆ busvoodoo_uart_generic_rs485

const struct busvoodoo_uart_generic_specific_t busvoodoo_uart_generic_rs485
static
Initial value:
= {
.multidrive = false,
.hwflowctl = false,
.rts_port = 0,
.rts_pin = 0,
.rts_rcc = 0,
.cts_port = 0,
.cts_pin = 0,
.cts_rcc = 0,
}
#define USART_TX_PORT(x)
get port for USART transmit pin based on USART identifier
Definition: global.h:194
#define RCC_USART(x)
get RCC for USART based on USART identifier
Definition: global.h:186
static void busvoodoo_rs485_receive_enable(void)
enable RS-485 transceiver received to allow receiving
#define RCC_USART_PORT(x)
get RCC for USART port based on USART identifier
Definition: global.h:210
static void busvoodoo_rs485_drive_enable(void)
enable RS-485 transceiver driver to allow transmitting
#define USART_RX_PIN(x)
get pin for USART receive pin based on USART identifier
Definition: global.h:204
#define USART_TX_PIN(x)
get pin for USART transmit pin based on USART identifier
Definition: global.h:202
#define RST_USART(x)
get RST for USART based on USART identifier
Definition: global.h:188
#define USART(x)
get USART based on USART identifier
Definition: global.h:184
#define USART_RX_PORT(x)
get port for USART receive pin based on USART identifier
Definition: global.h:196
static void busvoodoo_rs485_receive_disable(void)
enable RS-485 transceiver received to allow receiving
static void busvoodoo_rs485_drive_disable(void)
enable RS-485 transceiver driver to allow transmitting
#define BUSVOODOO_RS485_USART
USART peripheral.

RS-485 specific methods that will be called by the generic methods.

Definition at line 71 of file busvoodoo_rs485.c.