Skip to content

Added pinToInterrupt() variant macro (Paul Stoffregen) #1595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added digitalPinToInterrupt also to robot variants
  • Loading branch information
cmaglie committed Sep 28, 2013
commit 1a043554140cb2a605b9bc0501c4119a37c6cd8f
2 changes: 2 additions & 0 deletions hardware/arduino/avr/variants/robot_control/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ static const uint8_t LED1 = 17; // D17 - RX_Led
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )

#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : -1)))))

#ifdef ARDUINO_MAIN

// On the Arduino board, digital pins are also used
Expand Down
2 changes: 2 additions & 0 deletions hardware/arduino/avr/variants/robot_motor/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ static const uint8_t TK4 = 12; // A11
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )

#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : -1)))))

#ifdef ARDUINO_MAIN

// On the Arduino board, digital pins are also used
Expand Down