libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
#include <libopencm3/sam/usart.h>
Go to the source code of this file.
Functions | |
void | usart_set_databits (uint32_t usart, int bits) |
void | usart_set_stopbits (uint32_t usart, enum usart_stopbits sb) |
void | usart_set_parity (uint32_t usart, enum usart_parity par) |
void | usart_set_mode (uint32_t usart, enum usart_mode mode) |
void | usart_set_flow_control (uint32_t usart, enum usart_flowcontrol fc) |
void | usart_enable (uint32_t usart) |
void | usart_disable (uint32_t usart) |
void | usart_send (uint32_t usart, uint16_t data) |
uint16_t | usart_recv (uint32_t usart) |
void | usart_wait_send_ready (uint32_t usart) |
void | usart_wait_recv_ready (uint32_t usart) |
void | usart_send_blocking (uint32_t usart, uint16_t data) |
uint16_t | usart_recv_blocking (uint32_t usart) |
void | usart_enable_rx_interrupt (uint32_t usart) |
void | usart_disable_rx_interrupt (uint32_t usart) |
void | usart_wp_enable (uint32_t usart) |
void | usart_wp_disable (uint32_t usart) |
void | usart_select_clock (uint32_t usart, enum usart_clock clk) |
void | usart_set_character_length (uint32_t usart, enum usart_chrl chrl) |
void usart_disable | ( | uint32_t | usart | ) |
Definition at line 58 of file usart_common_all.c.
References USART_CR, USART_CR_RXDIS, and USART_CR_TXDIS.
void usart_disable_rx_interrupt | ( | uint32_t | usart | ) |
Definition at line 101 of file usart_common_all.c.
References USART_CSR_RXRDY, and USART_IDR.
void usart_enable | ( | uint32_t | usart | ) |
Definition at line 53 of file usart_common_all.c.
References USART_CR, USART_CR_RXEN, and USART_CR_TXEN.
void usart_enable_rx_interrupt | ( | uint32_t | usart | ) |
Definition at line 96 of file usart_common_all.c.
References USART_CSR_RXRDY, and USART_IER.
uint16_t usart_recv | ( | uint32_t | usart | ) |
Definition at line 68 of file usart_common_all.c.
References USART_RHR.
Referenced by usart_recv_blocking().
uint16_t usart_recv_blocking | ( | uint32_t | usart | ) |
Definition at line 89 of file usart_common_all.c.
References usart_recv(), and usart_wait_recv_ready().
void usart_select_clock | ( | uint32_t | usart, |
enum usart_clock | clk | ||
) |
Definition at line 116 of file usart_common_all.c.
References USART_MR, USART_MR_USCLKS_MASK, and USART_MR_USCLKS_SHIFT.
void usart_send | ( | uint32_t | usart, |
uint16_t | data | ||
) |
Definition at line 63 of file usart_common_all.c.
References USART_THR.
Referenced by usart_send_blocking().
void usart_send_blocking | ( | uint32_t | usart, |
uint16_t | data | ||
) |
Definition at line 83 of file usart_common_all.c.
References usart_send(), and usart_wait_send_ready().
void usart_set_character_length | ( | uint32_t | usart, |
enum usart_chrl | chrl | ||
) |
Definition at line 122 of file usart_common_all.c.
References USART_MR, and USART_MR_CHRL_SHIFT.
void usart_set_databits | ( | uint32_t | usart, |
int | bits | ||
) |
Definition at line 22 of file usart_common_all.c.
References USART_MR.
void usart_set_flow_control | ( | uint32_t | usart, |
enum usart_flowcontrol | fc | ||
) |
Definition at line 47 of file usart_common_all.c.
References USART_MR, and USART_MR_MODE_HW_HANDSHAKING.
void usart_set_mode | ( | uint32_t | usart, |
enum usart_mode | mode | ||
) |
Definition at line 39 of file usart_common_all.c.
References USART_CR, USART_CR_RXDIS, USART_CR_RXEN, USART_CR_TXDIS, USART_CR_TXEN, USART_MODE_RX, and USART_MODE_TX.
void usart_set_parity | ( | uint32_t | usart, |
enum usart_parity | par | ||
) |
Definition at line 34 of file usart_common_all.c.
References USART_MR.
void usart_set_stopbits | ( | uint32_t | usart, |
enum usart_stopbits | sb | ||
) |
Definition at line 28 of file usart_common_all.c.
References USART_MR.
void usart_wait_recv_ready | ( | uint32_t | usart | ) |
Definition at line 78 of file usart_common_all.c.
References USART_CSR, and USART_CSR_RXRDY.
Referenced by usart_recv_blocking().
void usart_wait_send_ready | ( | uint32_t | usart | ) |
Definition at line 73 of file usart_common_all.c.
References USART_CSR, and USART_CSR_TXRDY.
Referenced by usart_send_blocking().
void usart_wp_disable | ( | uint32_t | usart | ) |
Definition at line 111 of file usart_common_all.c.
References USART_WPMR, and USART_WPMR_KEY.
void usart_wp_enable | ( | uint32_t | usart | ) |
Definition at line 106 of file usart_common_all.c.
References USART_WPMR, USART_WPMR_KEY, and USART_WPMR_WPEN.