1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-06 01:08:25 +01:00

updated pin mappings for bootloader and pins_arduino.h in anticipation of final hardware.

This commit is contained in:
Zach Eveland 2011-09-16 15:46:51 -04:00
parent 8638d5b4e9
commit 23d0d05844
2 changed files with 35 additions and 33 deletions

View File

@ -25,11 +25,11 @@ typedef unsigned long u32;
#define USB_PID ARDUINO_MODEL_PID // passed in by Makefile - 0x0034 for Leonardo, 0x0035 for MIcro #define USB_PID ARDUINO_MODEL_PID // passed in by Makefile - 0x0034 for Leonardo, 0x0035 for MIcro
#define OEM_NAME 'l','e','o','n','a','r','d','o' // 8 chars #define OEM_NAME 'l','e','o','n','a','r','d','o' // 8 chars
#define BOARD_INIT() DDRC |= (1<<7); DDRB |= (1<<0); DDRE |= (1<<6); CPU_PRESCALE(0); DISABLE_JTAG(); #define BOARD_INIT() DDRC |= (1<<7); DDRB |= (1<<0); DDRD |= (1<<5); CPU_PRESCALE(0); DISABLE_JTAG();
#define LED0 PORTC &= ~(1<<7) #define LED0 PORTC &= ~(1<<7)
#define LED1 PORTC |= (1<<7) #define LED1 PORTC |= (1<<7)
#define TXLED0 PORTE |= (1<<6) #define TXLED0 PORTD |= (1<<5)
#define TXLED1 PORTE &= ~(1<<6) #define TXLED1 PORTD &= ~(1<<5)
#define RXLED0 PORTB |= (1<<0) #define RXLED0 PORTB |= (1<<0)
#define RXLED1 PORTB &= ~(1<<0) #define RXLED1 PORTB &= ~(1<<0)

View File

@ -28,9 +28,10 @@
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
#define ARDUINO_MODEL_USB_PID 0x0034 #define ARDUINO_MODEL_USB_PID 0x0034
#define TX_RX_LED_INIT DDRE |= (1<<6), DDRB |= (1<<0)
#define TXLED0 PORTE |= (1<<6) #define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
#define TXLED1 PORTE &= ~(1<<6) #define TXLED0 PORTD |= (1<<5)
#define TXLED1 PORTD &= ~(1<<5)
#define RXLED0 PORTB |= (1<<0) #define RXLED0 PORTB |= (1<<0)
#define RXLED1 PORTB &= ~(1<<0) #define RXLED1 PORTB &= ~(1<<0)
@ -52,6 +53,8 @@ const static uint8_t A4 = 18;
const static uint8_t A5 = 19; const static uint8_t A5 = 19;
const static uint8_t A6 = 20; const static uint8_t A6 = 20;
const static uint8_t A7 = 21; const static uint8_t A7 = 21;
const static uint8_t A8 = 22;
const static uint8_t A9 = 23;
// __AVR_ATmega32U4__ has an unusual mapping of pins to channels // __AVR_ATmega32U4__ has an unusual mapping of pins to channels
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
@ -105,9 +108,9 @@ extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
// D2 PD1 SDA SDA/INT1 // D2 PD1 SDA SDA/INT1
// D3# PD0 PWM8/SCL OC0B/SCL/INT0 // D3# PD0 PWM8/SCL OC0B/SCL/INT0
// D4 A6 PD4 ADC8 // D4 A6 PD4 ADC8
// D5# A7 PD6 FastPWM OC4D/ADC9 // D5# PC6 OC3A/#OC4A
// D6# A8 PD7 FastPWM #OC4D/ADC10 // D6# A8 PD7 FastPWM #OC4D/ADC10
// D7 PD5 #CTS // D7 PE6 INT6/AIN0
// //
// D8 PB4 ADC11/PCINT4 // D8 PB4 ADC11/PCINT4
// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC13/PCINT5 // D9# A9 PB5 PWM16 OC1A/#OC4B/ADC13/PCINT5
@ -130,7 +133,8 @@ extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
// D16 PB2 MOSI,PCINT2 // D16 PB2 MOSI,PCINT2
// D17 PB3 MISO,PCINT3 // D17 PB3 MISO,PCINT3
// //
// TXLED PE6 INT6 // TXLED PD5
// RXLED PB0
// HWB PE2 HWB // HWB PE2 HWB
@ -173,9 +177,9 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[18] = {
PD, PD,
PD, PD,
PD, PD,
PD, PC, /* 5 */
PD, PD, /* 6 */
PD, PE, /* 7 */
PB, /* 8 */ PB, /* 8 */
PB, PB,
@ -197,9 +201,9 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[18] = {
_BV(1), _BV(1),
_BV(0), _BV(0),
_BV(4), _BV(4),
_BV(6), _BV(6), /* 5, port C */
_BV(7), _BV(7), /* 6, port D */
_BV(5), _BV(6), /* 7, port E */
_BV(4), /* 8, port B */ _BV(4), /* 8, port B */
_BV(5), _BV(5),
@ -216,22 +220,22 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[18] = {
}; };
const uint8_t PROGMEM digital_pin_to_timer_PGM[18] = { const uint8_t PROGMEM digital_pin_to_timer_PGM[18] = {
NOT_ON_TIMER, /* 0, port D */ NOT_ON_TIMER,
NOT_ON_TIMER, NOT_ON_TIMER,
NOT_ON_TIMER, NOT_ON_TIMER,
TIMER0B, TIMER0B, /* 3 */
NOT_ON_TIMER,
NOT_ON_TIMER, // TIMER4D TODO - ZE - Fix this when there's a decision on what to do about these PWM pins
NOT_ON_TIMER, // TIMER4D_NOT TODO - ZE - Complementary output of TIMER4D on Digital Pin 6. Not sure this was intended.
NOT_ON_TIMER, NOT_ON_TIMER,
TIMER3A, /* 5 */
TIMER4D, /* 6 */
NOT_ON_TIMER,
NOT_ON_TIMER, /* 8 port B */ NOT_ON_TIMER,
TIMER1A, TIMER1A, /* 9 */
TIMER1B, TIMER1B, /* 10 */
TIMER0A, TIMER0A, /* 11 */
TIMER3A, /* 12 port C */ TIMER3A, /* 12 */
TIMER4A, TIMER4A, /* 13 */
NOT_ON_TIMER, /* 14 port B */ NOT_ON_TIMER, /* 14 port B */
NOT_ON_TIMER, NOT_ON_TIMER,
@ -245,11 +249,10 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[11] = {
A3 PF4 ADC4 A3 PF4 ADC4
A4 PF1 ADC1 A4 PF1 ADC1
A5 PF0 ADC0 A5 PF0 ADC0
D4 A6 PD4 ADC8 D4 A6 PD4 ADC8
D5 A7 PD6 FastPWM OC4D/ADC9 D6 A7 PD7 FastPWM #OC4D/ADC10
D6 A8 PD7 FastPWM #OC4D/ADC10 D9 A8 PB5 PWM16 OC1A/#OC4B/ADC13/PCINT5
D9 A9 PB5 PWM16 OC1A/#OC4B/ADC13/PCINT5 D10 A9 PB6 PWM16 OC1B/0c4B/ADC12/PCINT6
D10 A10 PB6 PWM16 OC1B/0c4B/ADC12/PCINT6
*/ */
7, 7,
@ -259,9 +262,8 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[11] = {
1, 1,
0, 0,
8, 8,
9,
10, 10,
13, 13,
12 12
}; };