Project 8
Bluetooth
|
Neff Site |
This module enables communication via USART. More...
#include "rn41.h"
Go to the source code of this file.
Macros | |
#define | USART_PORT RN41_PORT |
#define | USART_MODULE RN41_USART_MODULE |
#define | USART_RX_PIN_bp RN41_UART_TX_bp |
#define | USART_RX_PIN_bm RN41_UART_TX_bm |
#define | USART_TX_PIN_bp RN41_UART_RX_bp |
#define | USART_TX_PIN_bm RN41_UART_RX_bm |
#define | USART_DRE_vect RN41_DRE_vect |
#define | USART_RXC_vect RN41_RXC_vect |
#define | USART_BSEL_gc 11 |
#define | USART_BSCALE_gc -7 |
#define | USART_CONFIG (USART_CHSIZE_8BIT_gc | USART_PMODE_DISABLED_gc) |
Functions | |
void | usart_init (void) |
Initialize the USART. More... | |
uint8_t | usart_receive_complete (void) |
Receive complete. More... | |
uint8_t | usart_receive (void) |
Receive data. More... | |
uint8_t | usart_data_register_empty (void) |
Data register empty. More... | |
void | usart_transmit (uint8_t data) |
Transmit data. More... | |
This module enables communication via USART.
#define USART_BSCALE_gc -7 |
#define USART_BSEL_gc 11 |
#define USART_CONFIG (USART_CHSIZE_8BIT_gc | USART_PMODE_DISABLED_gc) |
#define USART_DRE_vect RN41_DRE_vect |
#define USART_MODULE RN41_USART_MODULE |
#define USART_PORT RN41_PORT |
#define USART_RX_PIN_bm RN41_UART_TX_bm |
#define USART_RX_PIN_bp RN41_UART_TX_bp |
#define USART_RXC_vect RN41_RXC_vect |
#define USART_TX_PIN_bm RN41_UART_RX_bm |
#define USART_TX_PIN_bp RN41_UART_RX_bp |
uint8_t usart_data_register_empty | ( | void | ) |
Data register empty.
Checks if the data register is empty. If it is empty new data can be transmitted.
void usart_init | ( | void | ) |
Initialize the USART.
Initializes the USART the gateway. The baud rate and the serial line parameters can be specified by the predefined constants.
uint8_t usart_receive | ( | void | ) |
Receive data.
Waits until a byte of data has been received and returns it.
uint8_t usart_receive_complete | ( | void | ) |
Receive complete.
Checks if a new data byte has been received.
void usart_transmit | ( | uint8_t | data | ) |
Transmit data.
Waits until the transmit buffer is empty and then transmits the passed byte of data.
data | The data to be transmitted. |
Contact | Generated by 1.8.13 |