Changeset 6390cc3 in avrstuff for libs/usart/usart.c
- Timestamp:
- Sep 24, 2017, 7:39:05 PM (7 years ago)
- Branches:
- main
- Children:
- 6c47e45
- Parents:
- 9a9d5d0
- git-author:
- Adrien Destugues <pulkomandy@…> (24/09/2017 17:13:58)
- git-committer:
- Adrien Destugues <pulkomandy@…> (24/09/2017 19:39:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libs/usart/usart.c
r9a9d5d0 r6390cc3 6 6 #ifndef BAUD 7 7 #error You must define BAUD to use libuart. 8 #endif 9 10 #ifdef __AVR_ATmega128__ 11 // FIXME there are two USARTs in this case and we should be able to drive either 12 #define UBRRH UBRR0H 13 #define UBRRL UBRR0L 14 #define UCSRA UCSR0A 15 #define UCSRC UCSR0C 16 #define UCSRB UCSR0B 17 #define UDR UDR0 8 18 #endif 9 19 … … 29 39 #ifdef __AVR_ATtiny2313__ 30 40 UCSRC = (1 << UCSZ1) | (1 << UCSZ0); 41 #elif defined __AVR_ATmega128__ 42 UCSRC = (3 << UCSZ0); 31 43 #else 32 44 UCSRC = (1 << URSEL) | (3 << UCSZ0);
Note:
See TracChangeset
for help on using the changeset viewer.