FastArduino - Arduino MEGA Support v1.10
C++ library to build fast but small Arduino/AVR projects
|
ATmega2560 (Arduino MEGA) specific features and pins. More...
#include "io.h"
#include "../defines.h"
#include <avr/sleep.h>
Go to the source code of this file.
Namespaces | |
namespace | board |
Defines all types and constants specific to support Arduino MEGA board (ATmega2560 MCU target). | |
Enumerations | |
enum class | board::Port : uint8_t { board::PORT_A = 0 , board::PORT_B , board::PORT_C , board::PORT_D , board::PORT_E , board::PORT_F , board::PORT_G , board::PORT_H , board::PORT_J , board::PORT_K , board::PORT_L , NONE = UINT8_MAX } |
Defines all available ports of ATmega2560. More... | |
enum class | board::DigitalPin : uint8_t { board::D0_PE0 = 0 , board::D0 = D0_PE0 , board::D1_PE1 , board::D1 = D1_PE1 , board::D2_PE4 , board::D2 = D2_PE4 , board::D3_PE5 , board::D3 = D3_PE5 , board::D4_PG5 , board::D4 = D4_PG5 , board::D5_PE3 , board::D5 = D5_PE3 , board::D6_PH3 , board::D6 = D6_PH3 , board::D7_PH4 , board::D7 = D7_PH4 , board::D8_PH5 , board::D8 = D8_PH5 , board::D9_PH6 , board::D9 = D9_PH6 , board::D10_PB4 , board::D10 = D10_PB4 , board::D11_PB5 , board::D11 = D11_PB5 , board::D12_PB6 , board::D12 = D12_PB6 , board::D13_PB7 , board::D13 = D13_PB7 , board::D14_PJ1 , board::D14 = D14_PJ1 , board::D15_PJ0 , board::D15 = D15_PJ0 , board::D16_PH1 , board::D16 = D16_PH1 , board::D17_PH0 , board::D17 = D17_PH0 , board::D18_PD3 , board::D18 = D18_PD3 , board::D19_PD2 , board::D19 = D19_PD2 , board::D20_PD1 , board::D20 = D20_PD1 , board::D21_PD0 , board::D21 = D21_PD0 , board::D22_PA0 , board::D22 = D22_PA0 , board::D23_PA1 , board::D23 = D23_PA1 , board::D24_PA2 , board::D24 = D24_PA2 , board::D25_PA3 , board::D25 = D25_PA3 , board::D26_PA4 , board::D26 = D26_PA4 , board::D27_PA5 , board::D27 = D27_PA5 , board::D28_PA6 , board::D28 = D28_PA6 , board::D29_PA7 , board::D29 = D29_PA7 , board::D30_PC7 , board::D30 = D30_PC7 , board::D31_PC6 , board::D31 = D31_PC6 , board::D32_PC5 , board::D32 = D32_PC5 , board::D33_PC4 , board::D33 = D33_PC4 , board::D34_PC3 , board::D34 = D34_PC3 , board::D35_PC2 , board::D35 = D35_PC2 , board::D36_PC1 , board::D36 = D36_PC1 , board::D37_PC0 , board::D37 = D37_PC0 , board::D38_PD7 , board::D38 = D38_PD7 , board::D39_PG2 , board::D39 = D39_PG2 , board::D40_PG1 , board::D40 = D40_PG1 , board::D41_PG0 , board::D41 = D41_PG0 , board::D42_PL7 , board::D42 = D42_PL7 , board::D43_PL6 , board::D43 = D43_PL6 , board::D44_PL5 , board::D44 = D44_PL5 , board::D45_PL4 , board::D45 = D45_PL4 , board::D46_PL3 , board::D46 = D46_PL3 , board::D47_PL2 , board::D47 = D47_PL2 , board::D48_PL1 , board::D48 = D48_PL1 , board::D49_PL0 , board::D49 = D49_PL0 , board::D50_PB3 , board::D50 = D50_PB3 , board::D51_PB2 , board::D51 = D51_PB2 , board::D52_PB1 , board::D52 = D52_PB1 , board::D53_PB0 , board::D53 = D53_PB0 , board::D54_PF0 , board::A0 = D54_PF0 , board::D55_PF1 , board::A1 = D55_PF1 , board::D56_PF2 , board::A2 = D56_PF2 , board::D57_PF3 , board::A3 = D57_PF3 , board::D58_PF4 , board::A4 = D58_PF4 , board::D59_PF5 , board::A5 = D59_PF5 , board::D60_PF6 , board::A6 = D60_PF6 , board::D61_PF7 , board::A7 = D61_PF7 , board::D62_PK0 , board::A8 = D62_PK0 , board::D63_PK1 , board::A9 = D63_PK1 , board::D64_PK2 , board::A10 = D64_PK2 , board::D65_PK3 , board::A11 = D65_PK3 , board::D66_PK4 , board::A12 = D66_PK4 , board::D67_PK5 , board::A13 = D67_PK5 , board::D68_PK6 , board::A14 = D68_PK6 , board::D69_PK7 , board::A15 = D69_PK7 , board::LED = D13_PB7 , NONE = 0XFF } |
Defines all available digital input/output pins of ATmega2560, with reference to Arduino MEGA pins. More... | |
enum class | board::AnalogClock : uint8_t { MAX_FREQ_50KHz = 0 , MAX_FREQ_100KHz , MAX_FREQ_200KHz , MAX_FREQ_500KHz , MAX_FREQ_1MHz } |
Defines available clocks of ATmega2560, used for analog input. More... | |
enum class | board::AnalogReference : uint8_t { board::AREF = 0 , board::AVCC , board::INTERNAL_1_1V , board::INTERNAL_2_56V } |
Defines available voltage references of ATmega2560, used for analog input. More... | |
enum class | board::AnalogPin : uint8_t { board::A0 = 0 , board::A1 , board::A2 , board::A3 , board::A4 , board::A5 , board::A6 , board::A7 , board::A8 , board::A9 , board::A10 , board::A11 , board::A12 , board::A13 , board::A14 , board::A15 , board::BANDGAP , NONE = UINT8_MAX } |
Defines all available analog input pins of ATmega2560, with reference to Arduino MEGA pins. More... | |
enum class | board::PWMPin : uint8_t { D13_PB7_OC0A = 0 , D4_PG5_OC0B , D11_PB5_OC1A , D12_PB6_OC1B , D13_PB7_OC1C , D10_PB4_OC2A , D9_PH6_OC2B , D5_PE3_OC3A , D2_PE4_OC3B , D3_PE5_OC3C , D6_PH3_OC4A , D7_PH4_OC4B , D8_PH5_OC4C , D46_PL3_OC5A , D45_PL4_OC5B , D44_PL5_OC5C , D2 = D2_PE4_OC3B , D3 = D3_PE5_OC3C , D4 = D4_PG5_OC0B , D5 = D5_PE3_OC3A , D6 = D6_PH3_OC4A , D7 = D7_PH4_OC4B , D8 = D8_PH5_OC4C , D9 = D9_PH6_OC2B , D10 = D10_PB4_OC2A , D11 = D11_PB5_OC1A , D12 = D12_PB6_OC1B , D44 = D44_PL5_OC5C , D45 = D45_PL4_OC5B , D46 = D46_PL3_OC5A , NONE = UINT8_MAX } |
Defines all digital output pins of ATmega2560, capable of PWM output. More... | |
enum class | board::ExternalInterruptPin : uint8_t { D21_PD0_EXT0 = 0 , D20_PD1_EXT1 , D19_PD2_EXT2 , D18_PD3_EXT3 , D2_PE4_EXT4 , D3_PE5_EXT5 , D21 = D21_PD0_EXT0 , D20 = D20_PD1_EXT1 , D19 = D19_PD2_EXT2 , D18 = D18_PD3_EXT3 , D2 = D2_PE4_EXT4 , D3 = D3_PE5_EXT5 } |
Defines all digital output pins of ATmega2560, usable as direct external interrupt pins. More... | |
enum class | board::InterruptPin : uint8_t { D53_PB0_PCI0 = uint8_t(DigitalPin::D53_PB0) , D52_PB1_PCI0 = uint8_t(DigitalPin::D52_PB1) , D51_PB2_PCI0 = uint8_t(DigitalPin::D51_PB2) , D50_PB3_PCI0 = uint8_t(DigitalPin::D50_PB3) , D10_PB4_PCI0 = uint8_t(DigitalPin::D10_PB4) , D11_PB5_PCI0 = uint8_t(DigitalPin::D11_PB5) , D12_PB6_PCI0 = uint8_t(DigitalPin::D12_PB6) , D13_PB7_PCI0 = uint8_t(DigitalPin::D13_PB7) , D0_PE0_PCI1 = uint8_t(DigitalPin::D0_PE0) , D15_PJ0_PCI1 = uint8_t(DigitalPin::D15_PJ0) , D14_PJ1_PCI1 = uint8_t(DigitalPin::D14_PJ1) , D62_PK0_PCI2 = uint8_t(DigitalPin::D62_PK0) , D63_PK1_PCI2 = uint8_t(DigitalPin::D63_PK1) , D64_PK2_PCI2 = uint8_t(DigitalPin::D64_PK2) , D65_PK3_PCI2 = uint8_t(DigitalPin::D65_PK3) , D66_PK4_PCI2 = uint8_t(DigitalPin::D66_PK4) , D67_PK5_PCI2 = uint8_t(DigitalPin::D67_PK5) , D68_PK6_PCI2 = uint8_t(DigitalPin::D68_PK6) , D69_PK7_PCI2 = uint8_t(DigitalPin::D69_PK7) , D53 = uint8_t(DigitalPin::D53_PB0) , D52 = uint8_t(DigitalPin::D52_PB1) , D51 = uint8_t(DigitalPin::D51_PB2) , D50 = uint8_t(DigitalPin::D50_PB3) , D10 = uint8_t(DigitalPin::D10_PB4) , D11 = uint8_t(DigitalPin::D11_PB5) , D12 = uint8_t(DigitalPin::D12_PB6) , D13 = uint8_t(DigitalPin::D13_PB7) , D15 = uint8_t(DigitalPin::D15_PJ0) , D14 = uint8_t(DigitalPin::D14_PJ1) , A8 = uint8_t(DigitalPin::D62_PK0) , A9 = uint8_t(DigitalPin::D63_PK1) , A10 = uint8_t(DigitalPin::D64_PK2) , A11 = uint8_t(DigitalPin::D65_PK3) , A12 = uint8_t(DigitalPin::D66_PK4) , A13 = uint8_t(DigitalPin::D67_PK5) , A14 = uint8_t(DigitalPin::D68_PK6) , A15 = uint8_t(DigitalPin::D69_PK7) } |
Defines all digital output pins of ATmega2560, usable as pin change interrupt (PCI) pins. More... | |
enum class | board::USART : uint8_t { board::USART0 = 0 , board::USART1 = 1 , board::USART2 = 2 , board::USART3 = 3 } |
Defines all USART modules of ATmega2560. More... | |
enum class | board::Timer : uint8_t { board::TIMER0 = 0 , board::TIMER1 = 1 , board::TIMER2 = 2 , board::TIMER3 = 3 , board::TIMER4 = 4 , board::TIMER5 = 5 } |
Defines all timers available for ATmega2560. More... | |
enum class | board::SleepMode : uint8_t { board::IDLE = SLEEP_MODE_IDLE , board::ADC_NOISE_REDUCTION = SLEEP_MODE_ADC , board::POWER_DOWN = SLEEP_MODE_PWR_DOWN , board::POWER_SAVE = SLEEP_MODE_PWR_SAVE , board::STANDBY = SLEEP_MODE_STANDBY , board::EXTENDED_STANDBY = SLEEP_MODE_EXT_STANDBY } |
Defines all available sleep modes for ATmega2560. More... | |
Functions | |
static void | board::init () |
Performs special initialization for ATmega2560, actually nothing at all. More... | |
ATmega2560 (Arduino MEGA) specific features and pins.
Definition in file mega.h.