Project 8  Bluetooth
Neff Site
usart.h
Go to the documentation of this file.
1 
16 #ifndef USART_H_
17 #define USART_H_
18 
19 #include "rn41.h"
20 
21 #define USART_PORT RN41_PORT
22 #define USART_MODULE RN41_USART_MODULE
23 
24 #define USART_RX_PIN_bp RN41_UART_TX_bp
25 #define USART_RX_PIN_bm RN41_UART_TX_bm
26 
27 #define USART_TX_PIN_bp RN41_UART_RX_bp
28 #define USART_TX_PIN_bm RN41_UART_RX_bm
29 
30 #define USART_DRE_vect RN41_DRE_vect
31 #define USART_RXC_vect RN41_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.
This module implements an interface for Bluetooth click module.
uint8_t usart_receive_complete(void)
Receive complete.
Contact