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.

40 lines
993B

  1. #ifndef _MEGA64_H_
  2. #define _MEGA64_H_
  3. /* Part-Code ISP */
  4. #define DEVTYPE_ISP 0x45
  5. /* Part-Code Boot */
  6. #define DEVTYPE_BOOT 0x46
  7. #define SIG_BYTE1 0x1E
  8. #define SIG_BYTE2 0x96
  9. #define SIG_BYTE3 0x02
  10. #ifndef UART_USE_SECOND
  11. #define UART_BAUD_HIGH UBRR0H
  12. #define UART_BAUD_LOW UBRR0L
  13. #define UART_STATUS UCSR0A
  14. #define UART_TXREADY UDRE0
  15. #define UART_RXREADY RXC0
  16. #define UART_DOUBLE U2X0
  17. #define UART_CTRL UCSR0B
  18. #define UART_CTRL_DATA ((1<<TXEN0) | (1<<RXEN0))
  19. #define UART_CTRL2 UCSR0C
  20. #define UART_CTRL2_DATA ((1<<UCSZ01) | (1<<UCSZ00))
  21. #define UART_DATA UDR0
  22. #else
  23. #define UART_BAUD_HIGH UBRR1H
  24. #define UART_BAUD_LOW UBRR1L
  25. #define UART_STATUS UCSR1A
  26. #define UART_TXREADY UDRE1
  27. #define UART_RXREADY RXC1
  28. #define UART_DOUBLE U2X1
  29. #define UART_CTRL UCSR1B
  30. #define UART_CTRL_DATA ((1<<TXEN1) | (1<<RXEN1))
  31. #define UART_CTRL2 UCSR1C
  32. #define UART_CTRL2_DATA ((1<<UCSZ11) | (1<<UCSZ10))
  33. #define UART_DATA UDR1
  34. #endif
  35. #endif // #ifndef _MEGA64_H_