diff options
author | WestfW <westfw@gmail.com> | 2011-06-10 16:17:13 -0700 |
---|---|---|
committer | WestfW <westfw@gmail.com> | 2011-06-10 16:17:13 -0700 |
commit | 4f44d2893a506ee3924785c91a5f8983c013150c (patch) | |
tree | 6c934d178a63c687babde11dbe84f6399030da5b /bootloaders/optiboot/pin_defs.h | |
parent | e115bd8643e2dfab00757ba1074a536024a894cf (diff) |
This is a relatively significant edit that brings the Arduino copy of
optiboot up-to-date with the optiboot source repository as of Jun-2011
(the last changes made in the optiboot repository were in Oct-2010)
This adds support for several plaforms, fixes the "30k bug", and
refactors the source to have separate stk500.h, boot.h, and pin_defs.h
These are the arduino opticode issues fixed:
http://code.google.com/p/arduino/issues/detail?id=380
optiboot has problems upload sketches bigger than 30 KB
http://code.google.com/p/arduino/issues/detail?id=556
update optiboot to the point of the latest optiboot project sources.
These are issues that had been solved in the optiboot source aready:
http://code.google.com/p/arduino/issues/detail?id=364
optiboot leaves timer1 configured when starting app, breaks PWM on
pin 9 and 10. (fixed with a workaround in arduino core.)
aka http://code.google.com/p/optiboot/source/detail?r=c778fbe72df6ac13ef730c25283358c3c970f73e
Support for ATmega8 and mega88.
Fix fuse settings for mega168 _ISP targets
Additional new platforms (mega, sanguino)
http://code.google.com/p/optiboot/issues/detail?id=26
Set R1 to 0 (already in arduino code)
http://code.google.com/p/optiboot/issues/detail?id=36&can=1
Fails to build correctly for mega88
After this commit, the only differences between the Arduino optiboot.c
and the optiboot repository optiboot.c are cosmetic.
Diffstat (limited to 'bootloaders/optiboot/pin_defs.h')
-rw-r--r-- | bootloaders/optiboot/pin_defs.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/bootloaders/optiboot/pin_defs.h b/bootloaders/optiboot/pin_defs.h new file mode 100644 index 0000000..313e453 --- /dev/null +++ b/bootloaders/optiboot/pin_defs.h @@ -0,0 +1,79 @@ +#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega88) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__) +/* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duemilanove */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +#define LED PINB5 + +/* Ports for soft UART */ +#ifdef SOFT_UART +#define UART_PORT PORTD +#define UART_PIN PIND +#define UART_DDR DDRD +#define UART_TX_BIT 1 +#define UART_RX_BIT 0 +#endif +#endif + +#if defined(__AVR_ATmega8__) + //Name conversion R.Wiersma + #define UCSR0A UCSRA + #define UDR0 UDR + #define UDRE0 UDRE + #define RXC0 RXC + #define TIFR1 TIFR + #define WDTCSR WDTCR +#endif + +/* Luminet support */ +#if defined(__AVR_ATtiny84__) +/* Red LED is connected to pin PA4 */ +#define LED_DDR DDRA +#define LED_PORT PORTA +#define LED_PIN PINA +#define LED PINA4 +/* Ports for soft UART - left port only for now. TX/RX on PA2/PA3 */ +#ifdef SOFT_UART +#define UART_PORT PORTA +#define UART_PIN PINA +#define UART_DDR DDRA +#define UART_TX_BIT 2 +#define UART_RX_BIT 3 +#endif +#endif + +/* Sanguino support */ +#if defined(__AVR_ATmega644P__) +/* Onboard LED is connected to pin PB0 on Sanguino */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +#define LED PINB0 + +/* Ports for soft UART */ +#ifdef SOFT_UART +#define UART_PORT PORTD +#define UART_PIN PIND +#define UART_DDR DDRD +#define UART_TX_BIT 1 +#define UART_RX_BIT 0 +#endif +#endif + +/* Mega support */ +#if defined(__AVR_ATmega1280__) +/* Onboard LED is connected to pin PB7 on Arduino Mega */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +#define LED PINB7 + +/* Ports for soft UART */ +#ifdef SOFT_UART +#define UART_PORT PORTE +#define UART_PIN PINE +#define UART_DDR DDRE +#define UART_TX_BIT 1 +#define UART_RX_BIT 0 +#endif +#endif |