AVR Bootloader (avrboot cleanup)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.0KB

  1. #ifndef _MEGA128CAN_H_
  2. #define _MEGA128CAN_H_
  3. /* Dummy: use ATmega128 device-code for now,
  4. must be same as used in avrdude.conf */
  5. /* Part-Code ISP */
  6. #define DEVTYPE_ISP 0x43
  7. /* Part-Code Boot */
  8. #define DEVTYPE_BOOT 0x44
  9. #define SIG_BYTE1 0x1E
  10. #define SIG_BYTE2 0x97
  11. #define SIG_BYTE3 0x81
  12. #ifndef UART_USE_SECOND
  13. #define UART_BAUD_HIGH UBRR0H
  14. #define UART_BAUD_LOW UBRR0L
  15. #define UART_STATUS UCSR0A
  16. #define UART_TXREADY UDRE0
  17. #define UART_RXREADY RXC0
  18. #define UART_DOUBLE U2X0
  19. #define UART_CTRL UCSR0B
  20. #define UART_CTRL_DATA ((1<<TXEN0) | (1<<RXEN0))
  21. #define UART_CTRL2 UCSR0C
  22. #define UART_CTRL2_DATA ((1<<UCSZ01) | (1<<UCSZ00))
  23. #define UART_DATA UDR0
  24. #else
  25. #define UART_BAUD_HIGH UBRR1H
  26. #define UART_BAUD_LOW UBRR1L
  27. #define UART_STATUS UCSR1A
  28. #define UART_TXREADY UDRE1
  29. #define UART_RXREADY RXC1
  30. #define UART_DOUBLE U2X1
  31. #define UART_CTRL UCSR1B
  32. #define UART_CTRL_DATA ((1<<TXEN1) | (1<<RXEN1))
  33. #define UART_CTRL2 UCSR1C
  34. #define UART_CTRL2_DATA ((1<<UCSZ11) | (1<<UCSZ10))
  35. #define UART_DATA UDR1
  36. #endif
  37. #endif // #ifndef _MEGA128CAN_H_