@@ -7,47 +7,49 @@ Maintained by Andy Gock
7
7
8
8
https://github.com/andygock/avr-uart
9
9
10
- Derived from original library by Peter Fleury
10
+ Derived from original library by Peter Fleury.
11
11
12
- Interrupt UART library using the built-in UART with transmit and receive circular buffers.
12
+ Interrupt driven UART library using the built-in UART with circular transmit and receive buffers.
13
13
14
14
An interrupt is generated when the UART has finished transmitting or
15
15
receiving a byte. The interrupt handling routines use circular buffers
16
16
for buffering received and transmitted data.
17
17
18
18
## Setting up
19
19
20
- The ` UART_RXn_BUFFER_SIZE ` and ` UART_TXn_BUFFER_SIZE ` constants define
21
- the size of the circular buffers in bytes. Note that these constants must be a power of 2.
22
- You may need to adapt this constants to your target and your application by adding to your
23
- compiler options:
20
+ The ` UART_RXn_BUFFER_SIZE ` and ` UART_TXn_BUFFER_SIZE ` symbols define
21
+ the size of the circular buffers in bytes. These values ** must be a power of 2** .
22
+ You may need to adapt this symbols to your target and your application by adding into your compiler options:
24
23
25
24
-DUART_RXn_BUFFER_SIZE=nn -DUART_TXn_BUFFER_SIZE=nn
26
25
27
- ` RXn ` and ` TXn ` refer to UART number, for UART3 with 128 byte buffers, add:
26
+ ` RXn ` and ` TXn ` refer to the UART number, for UART3 with 128 byte buffers, add:
28
27
29
28
-DUART_RX3_BUFFER_SIZE=128 -DUART_TX3_BUFFER_SIZE=128
30
29
31
- UART0 is always enabled by default, to enable the other available UARTs, add the following
32
- to your compiler options (or symbol options), for the relevant USART number:
30
+ UART0 is always enabled by default, to enable the other available UARTs, add the following to your compiler's symbol options for the relevant UART (also known as USART) number.
33
31
34
32
-DUSART1_ENABLED -DUSART2_ENABLED -DUSART3_ENABLED
35
33
36
- To enable large buffer support (over 256 bytes, up to 2^16 bytes) use:
34
+ To enable large buffer support (over 256 bytes, up to 2^15 bytes) use:
37
35
38
36
-DUSARTn_LARGE_BUFFER
39
37
40
- Where n = USART number.
38
+ Where n = USART number. The maximum buffer size is 32768.
41
39
42
- Supports AVR devices with up to 4 hardware USARTs.
40
+ This library supports AVR devices with up to 4 hardware USARTs.
43
41
44
42
### Compiler flags
45
43
46
- - AVR/GNU C compiler requires the ` -std=gnu99 ` flag.
44
+ AVR/GNU C compiler requires the ` -std=gnu99 ` flag.
47
45
48
46
## Documentation
49
47
50
- Doxygen based documentation will be coming soon.
48
+ Doxygen based documentation can be viwed at:
49
+
50
+ * HTML: < https://andygock.github.io/avr-uart-documentation/html/index.html >
51
+ * PDF: < https://andygock.github.io/avr-uart-documentation/latex/refman.pdf >
52
+ * RTF: < https://andygock.github.io/avr-uart-documentation/rtf/refman.rtf >
51
53
52
54
## Notes
53
55
0 commit comments