26#include "../defines.h"
32#define BOARD_ATMEGA2560
50 inline static void init() {}
640 IDLE = SLEEP_MODE_IDLE,
680 void ADC_vect(
void) SIGNAL_HANDLER;
681 void ANALOG_COMP_vect(
void) SIGNAL_HANDLER;
682 void INT0_vect(
void) SIGNAL_HANDLER;
683 void INT1_vect(
void) SIGNAL_HANDLER;
684 void INT2_vect(
void) SIGNAL_HANDLER;
685 void INT3_vect(
void) SIGNAL_HANDLER;
686 void INT4_vect(
void) SIGNAL_HANDLER;
687 void INT5_vect(
void) SIGNAL_HANDLER;
688 void INT6_vect(
void) SIGNAL_HANDLER;
689 void INT7_vect(
void) SIGNAL_HANDLER;
690 void PCINT0_vect(
void) SIGNAL_HANDLER;
691 void PCINT1_vect(
void) SIGNAL_HANDLER;
692 void PCINT2_vect(
void) SIGNAL_HANDLER;
693 void SPI_STC_vect(
void) SIGNAL_HANDLER;
694 void TIMER0_COMPA_vect(
void) SIGNAL_HANDLER;
695 void TIMER0_COMPB_vect(
void) SIGNAL_HANDLER;
696 void TIMER0_OVF_vect(
void) SIGNAL_HANDLER;
697 void TIMER1_COMPA_vect(
void) SIGNAL_HANDLER;
698 void TIMER1_COMPB_vect(
void) SIGNAL_HANDLER;
699 void TIMER1_COMPC_vect(
void) SIGNAL_HANDLER;
700 void TIMER1_OVF_vect(
void) SIGNAL_HANDLER;
701 void TIMER1_CAPT_vect(
void) SIGNAL_HANDLER;
702 void TIMER2_COMPA_vect(
void) SIGNAL_HANDLER;
703 void TIMER2_COMPB_vect(
void) SIGNAL_HANDLER;
704 void TIMER2_OVF_vect(
void) SIGNAL_HANDLER;
705 void TIMER3_COMPA_vect(
void) SIGNAL_HANDLER;
706 void TIMER3_COMPB_vect(
void) SIGNAL_HANDLER;
707 void TIMER3_COMPC_vect(
void) SIGNAL_HANDLER;
708 void TIMER3_OVF_vect(
void) SIGNAL_HANDLER;
709 void TIMER3_CAPT_vect(
void) SIGNAL_HANDLER;
710 void TIMER4_COMPA_vect(
void) SIGNAL_HANDLER;
711 void TIMER4_COMPB_vect(
void) SIGNAL_HANDLER;
712 void TIMER4_COMPC_vect(
void) SIGNAL_HANDLER;
713 void TIMER4_OVF_vect(
void) SIGNAL_HANDLER;
714 void TIMER4_CAPT_vect(
void) SIGNAL_HANDLER;
715 void TIMER5_COMPA_vect(
void) SIGNAL_HANDLER;
716 void TIMER5_COMPB_vect(
void) SIGNAL_HANDLER;
717 void TIMER5_COMPC_vect(
void) SIGNAL_HANDLER;
718 void TIMER5_OVF_vect(
void) SIGNAL_HANDLER;
719 void TIMER5_CAPT_vect(
void) SIGNAL_HANDLER;
720 void TWI_vect(
void) SIGNAL_HANDLER;
721 void WDT_vect(
void) SIGNAL_HANDLER;
722 void USART0_UDRE_vect(
void) SIGNAL_HANDLER;
723 void USART0_RX_vect(
void) SIGNAL_HANDLER;
724 void USART0_TX_vect(
void) SIGNAL_HANDLER;
725 void USART1_UDRE_vect(
void) SIGNAL_HANDLER;
726 void USART1_RX_vect(
void) SIGNAL_HANDLER;
727 void USART1_TX_vect(
void) SIGNAL_HANDLER;
728 void USART2_UDRE_vect(
void) SIGNAL_HANDLER;
729 void USART2_RX_vect(
void) SIGNAL_HANDLER;
730 void USART2_TX_vect(
void) SIGNAL_HANDLER;
731 void USART3_UDRE_vect(
void) SIGNAL_HANDLER;
732 void USART3_RX_vect(
void) SIGNAL_HANDLER;
733 void USART3_TX_vect(
void) SIGNAL_HANDLER;
734 void EE_READY_vect(
void) SIGNAL_HANDLER;
Defines all types and constants specific to support Arduino MEGA board (ATmega2560 MCU target).
PWMPin
Defines all digital output pins of ATmega2560, capable of PWM output.
Port
Defines all available ports of ATmega2560.
@ PORT_G
Port G (6 IO, only 4 available on Arduino MEGA)
@ PORT_D
Port D (8 IO, only 5 available on Arduino MEGA)
@ PORT_E
Port E (8 IO, only 5 available on Arduino MEGA)
@ PORT_J
Port J (8 IO, only 2 available on Arduino MEGA)
@ PORT_H
Port H (8 IO, only 6 available on Arduino MEGA)
static void init()
Performs special initialization for ATmega2560, actually nothing at all.
DigitalPin
Defines all available digital input/output pins of ATmega2560, with reference to Arduino MEGA pins.
@ D40
Pin PG1 (D40 on Arduino MEGA)
@ D21
Pin PD0 (D21 /SCL on Arduino MEGA)
@ D19_PD2
Pin PD2 (D19 /RX1 on Arduino MEGA)
@ D42
Pin PL7 (D42 on Arduino MEGA)
@ D41
Pin PG0 (D41 on Arduino MEGA)
@ D48_PL1
Pin PL1 (D48 on Arduino MEGA)
@ A6
Pin PF6 (D60/A6 on Arduino MEGA)
@ A12
Pin PK4 (D66/A12 on Arduino MEGA)
@ A4
Pin PF4 (D58/A4 on Arduino MEGA)
@ D15
Pin PJ0 (D15/RX3 on Arduino MEGA)
@ D0
Pin PE0 (D0/RX0 on Arduino MEGA)
@ D42_PL7
Pin PL7 (D42 on Arduino MEGA)
@ D64_PK2
Pin PK2 (D64/A10 on Arduino MEGA)
@ D35
Pin PC2 (D35 on Arduino MEGA)
@ D12_PB6
Pin PB6 (D12 on Arduino MEGA)
@ D2_PE4
Pin PE4 (D3 on Arduino MEGA)
@ D14_PJ1
Pin PJ1 (D14/TX3 on Arduino MEGA)
@ D11_PB5
Pin PB5 (D11 on Arduino MEGA)
@ D29
Pin PA7 (D29 on Arduino MEGA)
@ D18
Pin PD3 (D18 /TX1 on Arduino MEGA)
@ D62_PK0
Pin PK0 (D62/A8 on Arduino MEGA)
@ D0_PE0
Pin PE0 (D0/RX0 on Arduino MEGA)
@ D10_PB4
Pin PB4 (D10 on Arduino MEGA)
@ D4
Pin PG5 (D4 on Arduino MEGA)
@ D47_PL2
Pin PL2 (D47 on Arduino MEGA)
@ A1
Pin PF1 (D55/A1 on Arduino MEGA)
@ D61_PF7
Pin PF7 (D61/A7 on Arduino MEGA)
@ D45_PL4
Pin PL4 (D45 on Arduino MEGA)
@ D22_PA0
Pin PA0 (D22 on Arduino MEGA)
@ D17
Pin PH0 (D17 /RX2 on Arduino MEGA)
@ D25_PA3
Pin PA3 (D25 on Arduino MEGA)
@ D30
Pin PC7 (D30 on Arduino MEGA)
@ D65_PK3
Pin PK3 (D65/A11 on Arduino MEGA)
@ D49_PL0
Pin PL0 (D49 on Arduino MEGA)
@ D56_PF2
Pin PF2 (D56/A2 on Arduino MEGA)
@ D3_PE5
Pin PE5 (D3 on Arduino MEGA)
@ D13_PB7
Pin PB7 (D13 on Arduino MEGA)
@ D54_PF0
Pin PF0 (D54/A0 on Arduino MEGA)
@ D9_PH6
Pin PH6 (D9 on Arduino MEGA)
@ A14
Pin PK6 (D68/A14 on Arduino MEGA)
@ A10
Pin PK2 (D64/A10 on Arduino MEGA)
@ D49
Pin PL0 (D49 on Arduino MEGA)
@ D43
Pin PL6 (D43 on Arduino MEGA)
@ D1
Pin PE1 (D1/TX0 on Arduino MEGA)
@ D58_PF4
Pin PF4 (D58/A4 on Arduino MEGA)
@ D38_PD7
Pin PD7 (D38 on Arduino MEGA)
@ D38
Pin PD7 (D38 on Arduino MEGA)
@ D19
Pin PD2 (D19 /RX1 on Arduino MEGA)
@ D22
Pin PA0 (D22 on Arduino MEGA)
@ LED
Shortcut for LED pin on Arduino.
@ D66_PK4
Pin PK4 (D66/A12 on Arduino MEGA)
@ D60_PF6
Pin PF6 (D60/A6 on Arduino MEGA)
@ D41_PG0
Pin PG0 (D41 on Arduino MEGA)
@ D53_PB0
Pin PB0 (D53/SS on Arduino MEGA)
@ A3
Pin PF3 (D57/A3 on Arduino MEGA)
@ D6_PH3
Pin PH3 (D6 on Arduino MEGA)
@ D34_PC3
Pin PC3 (D34 on Arduino MEGA)
@ D39_PG2
Pin PG2 (D39 on Arduino MEGA)
@ D44_PL5
Pin PL5 (D44 on Arduino MEGA)
@ D16
Pin PH1 (D16 /TX2 on Arduino MEGA)
@ D34
Pin PC3 (D34 on Arduino MEGA)
@ D33
Pin PC4 (D33 on Arduino MEGA)
@ D1_PE1
Pin PE1 (D1/TX0 on Arduino MEGA)
@ D31
Pin PC6 (D31 on Arduino MEGA)
@ D50
Pin PB3 (D50/MISO on Arduino MEGA)
@ D39
Pin PG2 (D39 on Arduino MEGA)
@ D12
Pin PB6 (D12 on Arduino MEGA)
@ D10
Pin PB4 (D10 on Arduino MEGA)
@ D27
Pin PA5 (D27 on Arduino MEGA)
@ D25
Pin PA3 (D25 on Arduino MEGA)
@ D24_PA2
Pin PA2 (D24 on Arduino MEGA)
@ D5_PE3
Pin PE3 (D5 on Arduino MEGA)
@ D27_PA5
Pin PA5 (D27 on Arduino MEGA)
@ D29_PA7
Pin PA7 (D29 on Arduino MEGA)
@ A9
Pin PK1 (D63/A9 on Arduino MEGA)
@ D47
Pin PL2 (D47 on Arduino MEGA)
@ D55_PF1
Pin PF1 (D55/A1 on Arduino MEGA)
@ D37_PC0
Pin PC0 (D37 on Arduino MEGA)
@ D7
Pin PH4 (D7 on Arduino MEGA)
@ D28_PA6
Pin PA6 (D28 on Arduino MEGA)
@ D68_PK6
Pin PK6 (D68/A14 on Arduino MEGA)
@ D59_PF5
Pin PF5 (D59/A5 on Arduino MEGA)
@ D35_PC2
Pin PC2 (D35 on Arduino MEGA)
@ D7_PH4
Pin PH4 (D7 on Arduino MEGA)
@ D3
Pin PE5 (D3 on Arduino MEGA)
@ D32
Pin PC5 (D32 on Arduino MEGA)
@ D36
Pin PC1 (D36 on Arduino MEGA)
@ D51
Pin PB2 (D51/MOSI on Arduino MEGA)
@ D52
Pin PB1 (D52/SCK on Arduino MEGA)
@ D45
Pin PL4 (D45 on Arduino MEGA)
@ D24
Pin PA2 (D24 on Arduino MEGA)
@ D53
Pin PB0 (D53/SS on Arduino MEGA)
@ D23
Pin PA1 (D23 on Arduino MEGA)
@ D9
Pin PH6 (D9 on Arduino MEGA)
@ D37
Pin PC0 (D37 on Arduino MEGA)
@ D46
Pin PL3 (D46 on Arduino MEGA)
@ D8
Pin PH5 (D8 on Arduino MEGA)
@ D28
Pin PA6 (D28 on Arduino MEGA)
@ D20_PD1
Pin PD1 (D20 /SDA on Arduino MEGA)
@ D14
Pin PJ1 (D14/TX3 on Arduino MEGA)
@ D8_PH5
Pin PH5 (D8 on Arduino MEGA)
@ D13
Pin PB7 (D13 on Arduino MEGA)
@ A7
Pin PF7 (D61/A7 on Arduino MEGA)
@ D52_PB1
Pin PB1 (D52/SCK on Arduino MEGA)
@ D11
Pin PB5 (D11 on Arduino MEGA)
@ D17_PH0
Pin PH0 (D17 /RX2 on Arduino MEGA)
@ D2
Pin PE4 (D3 on Arduino MEGA)
@ D48
Pin PL1 (D48 on Arduino MEGA)
@ D30_PC7
Pin PC7 (D30 on Arduino MEGA)
@ A2
Pin PF2 (D56/A2 on Arduino MEGA)
@ A5
Pin PF5 (D59/A5 on Arduino MEGA)
@ D21_PD0
Pin PD0 (D21 /SCL on Arduino MEGA)
@ A15
Pin PK7 (D69/A15 on Arduino MEGA)
@ D36_PC1
Pin PC1 (D36 on Arduino MEGA)
@ D63_PK1
Pin PK1 (D63/A9 on Arduino MEGA)
@ D26
Pin PA4 (D26 on Arduino MEGA)
@ D69_PK7
Pin PK7 (D69/A15 on Arduino MEGA)
@ D43_PL6
Pin PL6 (D43 on Arduino MEGA)
@ D16_PH1
Pin PH1 (D16 /TX2 on Arduino MEGA)
@ D23_PA1
Pin PA1 (D23 on Arduino MEGA)
@ A0
Pin PF0 (D54/A0 on Arduino MEGA)
@ D57_PF3
Pin PF3 (D57/A3 on Arduino MEGA)
@ D15_PJ0
Pin PJ0 (D15/RX3 on Arduino MEGA)
@ D6
Pin PH3 (D6 on Arduino MEGA)
@ D4_PG5
Pin PG5 (D4 on Arduino MEGA)
@ D44
Pin PL5 (D44 on Arduino MEGA)
@ D50_PB3
Pin PB3 (D50/MISO on Arduino MEGA)
@ D46_PL3
Pin PL3 (D46 on Arduino MEGA)
@ D5
Pin PE3 (D5 on Arduino MEGA)
@ D26_PA4
Pin PA4 (D26 on Arduino MEGA)
@ D20
Pin PD1 (D20 /SDA on Arduino MEGA)
@ D32_PC5
Pin PC5 (D32 on Arduino MEGA)
@ A13
Pin PK5 (D67/A13 on Arduino MEGA)
@ A11
Pin PK3 (D65/A11 on Arduino MEGA)
@ D67_PK5
Pin PK5 (D67/A13 on Arduino MEGA)
@ D40_PG1
Pin PG1 (D40 on Arduino MEGA)
@ D51_PB2
Pin PB2 (D51/MOSI on Arduino MEGA)
@ D31_PC6
Pin PC6 (D31 on Arduino MEGA)
@ A8
Pin PK0 (D62/A8 on Arduino MEGA)
@ D18_PD3
Pin PD3 (D18 /TX1 on Arduino MEGA)
@ D33_PC4
Pin PC4 (D33 on Arduino MEGA)
AnalogClock
Defines available clocks of ATmega2560, used for analog input.
AnalogPin
Defines all available analog input pins of ATmega2560, with reference to Arduino MEGA pins.
@ BANDGAP
Bandgap reference.
InterruptPin
Defines all digital output pins of ATmega2560, usable as pin change interrupt (PCI) pins.
USART
Defines all USART modules of ATmega2560.
@ USART1
USART1 is connected to pins D18_PD3 (TX1) and D19_PD2 (RX1).
@ USART3
USART3 is connected to pins D14_PJ1 (TX3) and D15_PJ0 (RX3).
@ USART2
USART2 is connected to pins D16_PH1 (TX2) and D17_PH0 (RX2).
@ USART0
On Arduino MEGA, USART0 is connected to USB, ans is also connected to pins D1_PE1 (TX0) and D0_PE0 (R...
Timer
Defines all timers available for ATmega2560.
ExternalInterruptPin
Defines all digital output pins of ATmega2560, usable as direct external interrupt pins.
SleepMode
Defines all available sleep modes for ATmega2560.
@ EXTENDED_STANDBY
This mode is similar to POWER_SAVE, except the oscillator is kept running, hence waking up from this ...
@ ADC_NOISE_REDUCTION
In this mode, CPU is stopped but other peripherals and interrupts work normally, except IO.
@ POWER_DOWN
In this mode, everything is stopped (including oscillator) but external interrupts,...
@ IDLE
In this mode, CPU is stopped but all other peripherals and interrupts work normally.
@ STANDBY
This mode is similar to POWER_DOWN, except the oscillator is kept running, hence waking up from this ...
@ POWER_SAVE
This mode is similar to POWER_DOWN, except Timer2 is still running if enabled.
AnalogReference
Defines available voltage references of ATmega2560, used for analog input.
@ INTERNAL_2_56V
Voltage reference is internal 2.56V reference, generated from the internal bandgap reference.
@ INTERNAL_1_1V
Voltage reference is internal 1.1V reference, generated from the internal bandgap reference.
@ AREF
Voltage reference is given by the AREF pin.
@ AVCC
Voltage reference is given by the AVcc pin.