Skip to content

Commit

Permalink
Fix ATtiny828; proper USART conditionals in pin_defs.h,
Browse files Browse the repository at this point in the history
remove infinite recursion for "make attiny828at8"
  • Loading branch information
WestfW committed Oct 7, 2018
1 parent b1b8977 commit eea6dad
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion optiboot/bootloaders/optiboot/Makefile.tiny
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ endif


attiny828at8:
$(MAKE) attiny828at8 AVR_FREQ=8000000L BAUD_RATE=57600
$(MAKE) attiny828 AVR_FREQ=8000000L BAUD_RATE=57600
mv $(PROGRAM)_attiny828.hex $(PROGRAM)_$@.hex
ifndef PRODUCTION
mv $(PROGRAM)_attiny828.lst $(PROGRAM)_$@.lst
Expand Down
2 changes: 2 additions & 0 deletions optiboot/bootloaders/optiboot/makeall.tiny.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ make attiny841at8ser1 $*
make attiny841at20noLED $*
make attiny841at16noLED $*
make attiny841at8noLED $*

make attiny828at8 $*
24 changes: 16 additions & 8 deletions optiboot/bootloaders/optiboot/pin_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,27 @@
* differently.
*/
#if UART == 0
#if defined(LINDAT)
#define LIN_UART 1
#define UART_SRA UCSRA
#define UART_SRB UCSRB
#define UART_SRC UCSRC
#define UART_SRL UBRRL
#define UART_UDR LINDAT
#else
#if defined(UDR0)
# define UART_SRA UCSR0A
# define UART_SRB UCSR0B
# define UART_SRC UCSR0C
# define UART_SRL UBRR0L
# define UART_UDR UDR0
#elif defined(UDR)
# define UART_SRA UCSRA
# define UART_SRB UCSRB
# define UART_SRC UCSRC
# define UART_SRL UBRRL
# define UART_UDR UDR
#elif defined(LINDAT)
# define LIN_UART 1
# define UART_SRA UCSRA
# define UART_SRB UCSRB
# define UART_SRC UCSRC
# define UART_SRL UBRRL
# define UART_UDR LINDAT
#else
# error UART == 0, but no UART0 on device
#endif
#elif UART == 1
#if !defined(UDR1)
Expand Down

0 comments on commit eea6dad

Please sign in to comment.