Project 1
4×4 Keypad
|
Neff Site |
This module enables communication via USART. More...
#include "board.h"
Go to the source code of this file.
Macros | |
#define | USART_PORT USB_USART_PORT |
#define | USART_MODULE USB_USART_MODULE |
#define | USART_RX_PIN_bp USB_USART_RX_PIN_bp |
#define | USART_RX_PIN_bm USB_USART_RX_PIN_bm |
#define | USART_TX_PIN_bp USB_USART_TX_PIN_bp |
#define | USART_TX_PIN_bm USB_USART_TX_PIN_bm |
#define | USART_DRE_vect USB_USART_DRE_vect |
#define | USART_RXC_vect USB_USART_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 USB_USART_DRE_vect |
#define USART_MODULE USB_USART_MODULE |
#define USART_PORT USB_USART_PORT |
#define USART_RX_PIN_bm USB_USART_RX_PIN_bm |
#define USART_RX_PIN_bp USB_USART_RX_PIN_bp |
#define USART_RXC_vect USB_USART_RXC_vect |
#define USART_TX_PIN_bm USB_USART_TX_PIN_bm |
#define USART_TX_PIN_bp USB_USART_TX_PIN_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 |