Skip to content

Commit

Permalink
pin mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
rambo committed Feb 3, 2013
1 parent f947dd7 commit eab9a40
Showing 1 changed file with 11 additions and 11 deletions.
Expand Up @@ -70,11 +70,11 @@ USARTS

#define NUM_DIGITAL_PINS 30
#define NUM_ANALOG_INPUTS 8
#define EXTERNAL_NUM_INTERRUPTS 36 // PORTA to PORTE 3
// WTF
#define EXTERNAL_NUM_INTERRUPTS 30 // PORTA to PORTE 3

// TODO: Fix this mapping macro
#define analogInputToDigitalPin(p) ((p < 6) ? (p) + 22 : -1)
#define digitalPinHasPWM(p) (((p) >= 2 && (p) <= 6) || ((p) >= 9 && (p)<= 11) || ((p) >= 14 && (p)<= 19))
#define analogInputToDigitalPin(p) ((p < 12) ? (p) + 5 : -1)
#define digitalPinHasPWM(p) (((p) >= 0 && (p) <= 3) || ((p) >= 16 && (p)<= 21) || ((p) >= 24 && (p)<= 29))


// TODO: Map correctly
Expand Down Expand Up @@ -197,10 +197,11 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
// TIMERS
// -------------------------------------------
TIMER_E0A ,
TIMER_E0A , // 0
TIMER_E0B ,
TIMER_E0C ,
TIMER_E0D , // 5
TIMER_E0D , // 3
NOT_ON_TIMER ,
NOT_ON_TIMER ,
NOT_ON_TIMER ,
NOT_ON_TIMER ,
Expand All @@ -209,24 +210,23 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
NOT_ON_TIMER ,
NOT_ON_TIMER ,
NOT_ON_TIMER ,
NOT_ON_TIMER , // 13
NOT_ON_TIMER ,
NOT_ON_TIMER ,
NOT_ON_TIMER ,
TIMER_C0A , // 17
TIMER_C0A , // 16
TIMER_C0B ,
TIMER_C0C ,
TIMER_C0D ,
TIMER_C1A ,
TIMER_C1B ,
NOT_ON_TIMER , // 22
NOT_ON_TIMER ,
NOT_ON_TIMER ,
TIMER_D0A , // 25
TIMER_D0A , // 24
TIMER_D0B ,
TIMER_D0C ,
TIMER_D0D ,
TIMER_D1A ,
TIMER_D1B ,
TIMER_D1B , // 29
};

const TC0_t* PROGMEM timer_to_tc0_PGM[] = {
Expand Down

0 comments on commit eab9a40

Please sign in to comment.