Project 1  4×4 Keypad
Neff Site
usart.h
Go to the documentation of this file.
1 
16 #ifndef USART_H_
17 #define USART_H_
18 
19 #include "board.h"
20 
21 #define USART_PORT USB_USART_PORT
22 #define USART_MODULE USB_USART_MODULE
23 
24 #define USART_RX_PIN_bp USB_USART_RX_PIN_bp
25 #define USART_RX_PIN_bm USB_USART_RX_PIN_bm
26 
27 #define USART_TX_PIN_bp USB_USART_TX_PIN_bp
28 #define USART_TX_PIN_bm USB_USART_TX_PIN_bm
29 
30 #define USART_DRE_vect USB_USART_DRE_vect
31 #define USART_RXC_vect USB_USART_RXC_vect
32 
33 #define USART_BSEL_gc 11
34 #define USART_BSCALE_gc -7
35 #define USART_CONFIG (USART_CHSIZE_8BIT_gc | USART_PMODE_DISABLED_gc)
36 
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif
41 
47 void usart_init(void);
48 
54 uint8_t usart_receive_complete(void);
55 
61 uint8_t usart_receive(void);
62 
69 uint8_t usart_data_register_empty(void);
70 
77 void usart_transmit(uint8_t data);
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif /* USART_H_ */
uint8_t usart_receive(void)
Receive data.
uint8_t usart_data_register_empty(void)
Data register empty.
void usart_init(void)
Initialize the USART.
void usart_transmit(uint8_t data)
Transmit data.
uint8_t usart_receive_complete(void)
Receive complete.
Header file for the XMEGA-A1 Xplained evaluation board.
Contact