busvoodoo_uart.c File Reference

BusVoodoo UART mode (code) More...

Go to the source code of this file.

## Macros

#define | BUSVOODOO_UART_USART 3
| USART peripheral.

## Functions

static bool | busvoodoo_uart_setup (char **prefix, const char *line)
| setup UART mode More...
static void | busvoodoo_uart_exit (void)
| exit UART mode

## Variables

static const struct busvoodoo_uart_generic_specific_t | busvoodoo_uart_generic_uart
| UART specific methods that will be called by the generic methods. More...
const struct busvoodoo_mode_t | busvoodoo_uart_mode
| UART mode interface definition. More...

## Detailed Description

BusVoodoo UART 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 UART communication

Definition in file busvoodoo_uart.c.

## Function Documentation

## busvoodoo_uart_setup()

static bool busvoodoo_uart_setup | ( | char ** | prefix,
|  | const char * | line
| ) |  |

static

setup UART mode

Parameters

  [out] | prefix | terminal prompt prefix
  [in] | line | terminal prompt line to configure mode

Returns
  if setup is complete

Definition at line 77 of file busvoodoo_uart.c.

## Variable Documentation

## busvoodoo_uart_generic_uart

const struct busvoodoo_uart_generic_specific_t busvoodoo_uart_generic_uart

static

Initial value:
= {
.usart = USART(BUSVOODOO_UART_USART),
.usart_rcc = RCC_USART(BUSVOODOO_UART_USART),
.usart_rst = RST_USART(BUSVOODOO_UART_USART),
.multidrive = true,
.tx_port = USART_TX_PORT(BUSVOODOO_UART_USART),
.tx_pin = USART_TX_PIN(BUSVOODOO_UART_USART),
.tx_rcc = RCC_USART_PORT(BUSVOODOO_UART_USART),
.tx_pre = NULL,
.tx_post = NULL,
.rx_port = USART_RX_PORT(BUSVOODOO_UART_USART),
.rx_pin = USART_RX_PIN(BUSVOODOO_UART_USART),
.rx_rcc = RCC_USART_PORT(BUSVOODOO_UART_USART),
.rx_pre = NULL,
.rx_post = NULL,
.hwflowctl = true,
.rts_port = USART_RTS_PORT(BUSVOODOO_UART_USART),
.rts_pin = USART_RTS_PIN(BUSVOODOO_UART_USART),
.rts_rcc = RCC_USART_PORT(BUSVOODOO_UART_USART),
.cts_port = USART_CTS_PORT(BUSVOODOO_UART_USART),
.cts_pin = USART_CTS_PIN(BUSVOODOO_UART_USART),
.cts_rcc = RCC_USART_PORT(BUSVOODOO_UART_USART),
}
USART_TX_PORT
#define USART_TX_PORT(x)
get port for USART transmit pin based on USART identifier
Definition: global.h:194
RCC_USART
#define RCC_USART(x)
get RCC for USART based on USART identifier
Definition: global.h:186
RCC_USART_PORT
#define RCC_USART_PORT(x)
get RCC for USART port based on USART identifier
Definition: global.h:210
USART_RX_PIN
#define USART_RX_PIN(x)
get pin for USART receive pin based on USART identifier
Definition: global.h:204
USART_TX_PIN
#define USART_TX_PIN(x)
get pin for USART transmit pin based on USART identifier
Definition: global.h:202
USART_CTS_PORT
#define USART_CTS_PORT(x)
get port for USART CTS pin based on USART identifier
Definition: global.h:200
BUSVOODOO_UART_USART
#define BUSVOODOO_UART_USART
USART peripheral.
Definition: busvoodoo_uart.c:44
RST_USART
#define RST_USART(x)
get RST for USART based on USART identifier
Definition: global.h:188
USART
#define USART(x)
get USART based on USART identifier
Definition: global.h:184
USART_RX_PORT
#define USART_RX_PORT(x)
get port for USART receive pin based on USART identifier
Definition: global.h:196
USART_RTS_PIN
#define USART_RTS_PIN(x)
get pin for USART RTS pin based on USART identifier
Definition: global.h:206
USART_CTS_PIN
#define USART_CTS_PIN(x)
get pin for USART CTS pin based on USART identifier
Definition: global.h:208
USART_RTS_PORT
#define USART_RTS_PORT(x)
get port for USART RTS pin based on USART identifier
Definition: global.h:198

UART specific methods that will be called by the generic methods.

Definition at line 48 of file busvoodoo_uart.c.

## busvoodoo_uart_mode

const struct busvoodoo_mode_t busvoodoo_uart_mode

Initial value:
= {
.name = "uart",
.description = "Universal Asynchronous Receiver-Transmitter",
.full_only = false,
.setup = &busvoodoo_uart_setup,
.commands = busvoodoo_uart_generic_commands,
.commands_nb = busvoodoo_uart_generic_commands_nb,
.exit = &busvoodoo_uart_exit,
}
busvoodoo_uart_setup
static bool busvoodoo_uart_setup(char **prefix, const char *line)
setup UART mode
Definition: busvoodoo_uart.c:77
busvoodoo_uart_generic_commands_nb
#define busvoodoo_uart_generic_commands_nb
number of commands supported by the generic UART mode
Definition: busvoodoo_uart_generic.h:64
busvoodoo_uart_generic_commands
const struct menu_command_t busvoodoo_uart_generic_commands[busvoodoo_uart_generic_commands_nb]
commands supported by the generic UART mode
Definition: busvoodoo_uart_generic.c:655
busvoodoo_uart_exit
static void busvoodoo_uart_exit(void)
exit UART mode
Definition: busvoodoo_uart.c:106

UART mode interface definition.

Definition at line 111 of file busvoodoo_uart.c.