Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Handling of UART hardware for STM32. More...
#include "mcu_periph/uart.h"
#include "mcu_periph/gpio.h"
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/cm3/nvic.h>
#include "std.h"
#include <BOARD_CONFIG>
Go to the source code of this file.
Functions | |
void | uart_periph_set_baudrate (struct uart_periph *p, uint32_t baud) |
void | uart_periph_set_bits_stop_parity (struct uart_periph *p, uint8_t bits, uint8_t stop, uint8_t parity) |
void | uart_periph_set_mode (struct uart_periph *p, bool_t tx_enabled, bool_t rx_enabled, bool_t hw_flow_control) |
void | uart_put_byte (struct uart_periph *p, uint8_t data) |
static void | usart_isr (struct uart_periph *p) |
static void | usart_enable_irq (uint8_t IRQn) |
Handling of UART hardware for STM32.
Definition in file uart_arch.c.
void uart_periph_set_baudrate | ( | struct uart_periph * | p, |
uint32_t | baud | ||
) |
Definition at line 42 of file uart_arch.c.
References uart_periph::baudrate, uart_periph::dev, uart_periph::reg_addr, serial_port_close(), serial_port_free(), serial_port_new(), serial_port_open_raw(), and TRACE.
void uart_periph_set_bits_stop_parity | ( | struct uart_periph * | p, |
uint8_t | bits, | ||
uint8_t | stop, | ||
uint8_t | parity | ||
) |
Definition at line 63 of file uart_arch.c.
References uart_periph::reg_addr, UBITS_7, UPARITY_EVEN, UPARITY_ODD, and USTOP_2.
void uart_periph_set_mode | ( | struct uart_periph * | p, |
bool_t | tx_enabled, | ||
bool_t | rx_enabled, | ||
bool_t | hw_flow_control | ||
) |
Definition at line 92 of file uart_arch.c.
References uart_periph::reg_addr.
Referenced by hott_enable_receiver(), and hott_enable_transmitter().
void uart_put_byte | ( | struct uart_periph * | p, |
uint8_t | data | ||
) |
Definition at line 112 of file uart_arch.c.
References SerialPort::fd, uart_periph::reg_addr, TRACE, TRUE, uart_periph::tx_buf, uart_periph::tx_extract_idx, uart_periph::tx_insert_idx, uart_periph::tx_running, and UART_TX_BUFFER_SIZE.
|
inlinestatic |
Definition at line 183 of file uart_arch.c.
|
inlinestatic |
Definition at line 136 of file uart_arch.c.
References FALSE, uart_periph::fe_err, uart_periph::ne_err, uart_periph::ore, uart_periph::reg_addr, uart_periph::rx_buf, uart_periph::rx_extract_idx, uart_periph::rx_insert_idx, uart_periph::tx_buf, uart_periph::tx_extract_idx, uart_periph::tx_insert_idx, uart_periph::tx_running, UART_RX_BUFFER_SIZE, and UART_TX_BUFFER_SIZE.