FastArduino - Arduino LEONARDO Support v1.10
C++ library to build fast but small Arduino/AVR projects
|
Defines all types and constants specific to support Arduino LEONARDO board (ATmega32u4 MCU target). More...
Enumerations | |
enum class | Port : uint8_t { PORT_B = 0 , PORT_C , PORT_D , PORT_E , PORT_F , NONE = UINT8_MAX } |
Defines all available ports of ATmega32u4. More... | |
enum class | DigitalPin : uint8_t { D0_PD2 = 0 , D0 = D0_PD2 , D1_PD3 , D1 = D1_PD3 , D2_PD1 , D2 = D2_PD1 , D3_PD0 , D3 = D3_PD0 , D4_PD4 , D4 = D4_PD4 , D5_PC6 , D5 = D5_PC6 , D6_PD7 , D6 = D6_PD7 , D7_PE6 , D7 = D7_PE6 , D8_PB4 , D8 = D8_PB4 , D9_PB5 , D9 = D9_PB5 , D10_PB6 , D10 = D10_PB6 , D11_PB7 , D11 = D11_PB7 , D12_PD6 , D12 = D12_PD6 , D13_PC7 , D13 = D13_PC7 , A0_PF7 , A0 = A0_PF7 , A1_PF6 , A1 = A1_PF6 , A2_PF5 , A2 = A2_PF5 , A3_PF4 , A3 = A3_PF4 , A4_PF1 , A4 = A4_PF1 , A5_PF0 , A5 = A5_PF0 , SCK_PB1 , MOSI_PB2 , MISO_PB3 , RXLED_PB0 , TXLED_PD5 , LED = D13_PC7 , NONE = UINT8_MAX } |
Defines all available digital input/output pins of ATmega32u4, with reference to Arduino LEONARDO pins. More... | |
enum class | AnalogClock : uint8_t { MAX_FREQ_50KHz = 0 , MAX_FREQ_100KHz , MAX_FREQ_200KHz , MAX_FREQ_500KHz , MAX_FREQ_1MHz } |
Defines available clocks of ATmega32u4, used for analog input. More... | |
enum class | AnalogReference : uint8_t { AREF = 0 , AVCC , INTERNAL_2_56V } |
Defines available voltage references of ATmega32u4, used for analog input. More... | |
enum class | AnalogPin : uint8_t { A0_ADC7 = 0 , A0 = A0_ADC7 , A1_ADC6 , A1 = A1_ADC6 , A2_ADC5 , A2 = A2_ADC5 , A3_ADC4 , A3 = A3_ADC4 , A4_ADC1 , A4 = A4_ADC1 , A5_ADC0 , A5 = A5_ADC0 , A6_D4_ADC8 , D4 = A6_D4_ADC8 , A7_D6_ADC10 , D6 = A7_D6_ADC10 , A8_D8_ADC11 , D8 = A8_D8_ADC11 , A9_D9_ADC12 , D9 = A9_D9_ADC12 , A10_D10_ADC13 , D10 = A10_D10_ADC13 , A11_D12_ADC9 , D12 = A11_D12_ADC9 , TEMP , BANDGAP , NONE = UINT8_MAX } |
Defines all available analog input pins of ATmega32u4, with reference to Arduino LEONARDO pins. More... | |
enum class | PWMPin : uint8_t { D11_PB7_OC0A = 0 , D3_PD0_OC0B , D9_PB5_OC1A , D10_PB6_OC1B , D11_PB7_OC1C , D5_PC6_OC3A , D3 = D3_PD0_OC0B , D9 = D9_PB5_OC1A , D10 = D10_PB6_OC1B , D5 = D5_PC6_OC3A , NONE = UINT8_MAX } |
Defines all digital output pins of ATmega32u4, capable of PWM output. More... | |
enum class | ExternalInterruptPin : uint8_t { D3_PD0_EXT0 = 0 , D2_PD1_EXT1 , D0_PD2_EXT2 , D1_PD3_EXT3 , D7_PE6_EXT6 , D3 = D3_PD0_EXT0 , D2 = D2_PD1_EXT1 , D0 = D0_PD2_EXT2 , D1 = D1_PD3_EXT3 , D7 = D7_PE6_EXT6 } |
Defines all digital output pins of ATmega32u4, usable as direct external interrupt pins. More... | |
enum class | InterruptPin : uint8_t { RXLED_PB0_PCI0 = uint8_t(DigitalPin::RXLED_PB0) , SCK_PB1_PCI0 = uint8_t(DigitalPin::SCK_PB1) , MOSI_PB2_PCI0 = uint8_t(DigitalPin::MOSI_PB2) , MISO_PB3_PCI0 = uint8_t(DigitalPin::MISO_PB3) , D8_PB4_PCI0 = uint8_t(DigitalPin::D8_PB4) , D9_PB5_PCI0 = uint8_t(DigitalPin::D9_PB5) , D10_PB6_PCI0 = uint8_t(DigitalPin::D10_PB6) , D11_PB7_PCI0 = uint8_t(DigitalPin::D11_PB7) , D8 = D8_PB4_PCI0 , D9 = D9_PB5_PCI0 , D10 = D10_PB6_PCI0 , D11 = D11_PB7_PCI0 } |
Defines all digital output pins of ATmega32u4, usable as pin change interrupt (PCI) pins. More... | |
enum class | USART : uint8_t { USART1 = 1 } |
Defines all USART modules of ATmega32u4, actually only one. More... | |
enum class | Timer : uint8_t { TIMER0 = 0 , TIMER1 = 1 , TIMER3 = 3 } |
Defines all "standard" timers available for ATmega32u4. More... | |
enum class | SleepMode : uint8_t { IDLE = SLEEP_MODE_IDLE , ADC_NOISE_REDUCTION = SLEEP_MODE_ADC , POWER_DOWN = SLEEP_MODE_PWR_DOWN , POWER_SAVE = SLEEP_MODE_PWR_SAVE , STANDBY = SLEEP_MODE_STANDBY , EXTENDED_STANDBY = SLEEP_MODE_EXT_STANDBY } |
Defines all available sleep modes for ATmega32u4. More... | |
Functions | |
static void | init () |
Performs special initialization for ATmega32u4, actually disabling USB related interrupts, to avoid strange behavior at reset time. More... | |
Defines all types and constants specific to support Arduino LEONARDO board (ATmega32u4 MCU target).
LEONARDO pinout: http://duino4projects.com/wp-content/uploads/2013/04/Ardunio_leonardo_pinout.jpg
|
strong |
Defines all available ports of ATmega32u4.
Definition at line 59 of file leonardo.h.
|
strong |
Defines all available digital input/output pins of ATmega32u4, with reference to Arduino LEONARDO pins.
Each symbol is in the form Dxx_Pyz
, where xx
is the pin number on Arduino, y
is the port letter (B, C, D, E or F) and z
is the bit number for that pin within its port.
Definition at line 82 of file leonardo.h.
|
strong |
Defines available clocks of ATmega32u4, used for analog input.
Definition at line 187 of file leonardo.h.
|
strong |
Defines available voltage references of ATmega32u4, used for analog input.
Definition at line 199 of file leonardo.h.
|
strong |
Defines all available analog input pins of ATmega32u4, with reference to Arduino LEONARDO pins.
Note that this includes also other sources than pin, e.g. the internal bandgap reference or the temperature sensor.
Definition at line 216 of file leonardo.h.
|
strong |
Defines all digital output pins of ATmega32u4, capable of PWM output.
Each symbol is in the form Dxx_Pyz_OCuv
, where xx
is the pin number on Arduino, y
is the port letter (B, C or D), z
is the bit number for that pin within its port, u
is the number of the timer used by this PWM pin and v
the letter indicating which compare register of the timer this PWM pin is mapped to.
Note that Timer4, which is specific (high speed) is not present here, as it is not supported (yet) by FastArduino.
Also note that ATmega32u4 has pins that can be linked to several timers (e.g. pin PB7 is connected to OC0A and OC1C) but FastArduino is currently limited to pins linked to only one timer, hence for each pin, a choice had to be made: the main principles for this choice were to take timer comparison channels A and B first. In the future, support for pins with multiple timers linked may be added.
Definition at line 294 of file leonardo.h.
|
strong |
Defines all digital output pins of ATmega32u4, usable as direct external interrupt pins.
Each symbol is in the form Dxx_Pyz_EXTu
, where xx
is the pin number on Arduino, y
is the port letter (D or E), z
is the bit number for that pin within its port and u
is the number of the interrupt for that pin.
Definition at line 320 of file leonardo.h.
|
strong |
Defines all digital output pins of ATmega32u4, usable as pin change interrupt (PCI) pins.
Each symbol is in the form Dxx_Pyz_PCIu
or FUNC_Pyz_PCIu
, where FUNC
is the specific function of the pin or xx
the pin number on Arduino, y
is the port letter (always B), z
is the bit number for that pin within its port and u
is the number of the PCI vector for that pin.
Definition at line 344 of file leonardo.h.
|
strong |
Defines all USART modules of ATmega32u4, actually only one.
Note that USB device is not represented here as it is not supported yet by FastArduino.
Definition at line 366 of file leonardo.h.
|
strong |
Defines all "standard" timers available for ATmega32u4.
This excludes specific "high-speed" Timer4, not supported by FastArduino currently.
Enumerator | |
---|---|
TIMER0 | Timer0 (8 bits) |
TIMER1 | Timer1 (16 bits) |
TIMER3 | Timer3 (16 bits) |
Definition at line 375 of file leonardo.h.
|
strong |
Defines all available sleep modes for ATmega32u4.
Definition at line 390 of file leonardo.h.
|
inlinestatic |
Performs special initialization for ATmega32u4, actually disabling USB related interrupts, to avoid strange behavior at reset time.
This must be called first in your main()
function, even before sei()
.
Definition at line 46 of file leonardo.h.