22#ifndef BOARDS_LEONARDO_HH
23#define BOARDS_LEONARDO_HH
26#include "../defines.h"
31#define BOARD_ATMEGA32U4
49 *((
volatile uint8_t*) USBCON) = 0;
50 *((
volatile uint8_t*) UDCON) = 0;
52 *((
volatile uint8_t*) UDINT) = 0;
53 *((
volatile uint8_t*) UDIEN) = 0;
397 IDLE = SLEEP_MODE_IDLE,
433 void ADC_vect(
void) SIGNAL_HANDLER;
434 void ANALOG_COMP_vect(
void) SIGNAL_HANDLER;
435 void INT0_vect(
void) SIGNAL_HANDLER;
436 void INT1_vect(
void) SIGNAL_HANDLER;
437 void INT2_vect(
void) SIGNAL_HANDLER;
438 void INT3_vect(
void) SIGNAL_HANDLER;
439 void INT6_vect(
void) SIGNAL_HANDLER;
440 void PCINT0_vect(
void) SIGNAL_HANDLER;
441 void SPI_STC_vect(
void) SIGNAL_HANDLER;
442 void TIMER0_COMPA_vect(
void) SIGNAL_HANDLER;
443 void TIMER0_COMPB_vect(
void) SIGNAL_HANDLER;
444 void TIMER0_OVF_vect(
void) SIGNAL_HANDLER;
445 void TIMER1_CAPT_vect(
void) SIGNAL_HANDLER;
446 void TIMER1_COMPA_vect(
void) SIGNAL_HANDLER;
447 void TIMER1_COMPB_vect(
void) SIGNAL_HANDLER;
448 void TIMER1_COMPC_vect(
void) SIGNAL_HANDLER;
449 void TIMER1_OVF_vect(
void) SIGNAL_HANDLER;
450 void TIMER3_CAPT_vect(
void) SIGNAL_HANDLER;
451 void TIMER3_COMPA_vect(
void) SIGNAL_HANDLER;
452 void TIMER3_COMPB_vect(
void) SIGNAL_HANDLER;
453 void TIMER3_COMPC_vect(
void) SIGNAL_HANDLER;
454 void TIMER3_OVF_vect(
void) SIGNAL_HANDLER;
455 void TIMER4_COMPA_vect(
void) SIGNAL_HANDLER;
456 void TIMER4_COMPB_vect(
void) SIGNAL_HANDLER;
457 void TIMER4_COMPD_vect(
void) SIGNAL_HANDLER;
458 void TIMER4_OVF_vect(
void) SIGNAL_HANDLER;
459 void TWI_vect(
void) SIGNAL_HANDLER;
460 void WDT_vect(
void) SIGNAL_HANDLER;
461 void USART1_RX_vect(
void) SIGNAL_HANDLER;
462 void USART1_TX_vect(
void) SIGNAL_HANDLER;
463 void USART1_UDRE_vect(
void) SIGNAL_HANDLER;
464 void EE_READY_vect(
void) SIGNAL_HANDLER;
Defines all types and constants specific to support Arduino LEONARDO board (ATmega32u4 MCU target).
PWMPin
Defines all digital output pins of ATmega32u4, capable of PWM output.
Port
Defines all available ports of ATmega32u4.
@ PORT_D
Port D (8 IO, only 7 available on LEONARDO)
@ PORT_E
Port E (2 IO, only 1 available on LEONARDO)
@ PORT_B
Port B (8 IO, only 7 available on LEONARDO)
static void init()
Performs special initialization for ATmega32u4, actually disabling USB related interrupts,...
DigitalPin
Defines all available digital input/output pins of ATmega32u4, with reference to Arduino LEONARDO pin...
@ A1_PF6
Pin PF6 (A1 on Arduino LEONARDO)
@ D6_PD7
Pin PD7 (D6 on Arduino LEONARDO)
@ A4
Pin PF1 (A4 on Arduino LEONARDO)
@ A0_PF7
Pin PF7 (A0 on Arduino LEONARDO)
@ D0
Pin PD2 (D0 on Arduino LEONARDO)
@ D2_PD1
Pin PD1 (D2 on Arduino LEONARDO)
@ A4_PF1
Pin PF1 (A4 on Arduino LEONARDO)
@ D4
Pin PD4 (D4 on Arduino LEONARDO)
@ A1
Pin PF6 (A1 on Arduino LEONARDO)
@ MISO_PB3
Pin PB3 (MISO (SPI) on Arduino LEONARDO)
@ D5_PC6
Pin PC6 (D5 on Arduino LEONARDO)
@ D10_PB6
Pin PB6 (D10 on Arduino LEONARDO)
@ D0_PD2
Pin PD2 (D0 on Arduino LEONARDO)
@ D1
Pin PD3 (D1 on Arduino LEONARDO)
@ RXLED_PB0
Pin PB0 (RXLED on Arduino LEONARDO, no pin)
@ D1_PD3
Pin PD3 (D1 on Arduino LEONARDO)
@ LED
Shortcut for LED pin on Arduino.
@ A3
Pin PF4 (A3 on Arduino LEONARDO)
@ D3_PD0
Pin PD0 (D3 on Arduino LEONARDO)
@ MOSI_PB2
Pin PB2 (MOSI (SPI) on Arduino LEONARDO)
@ D12
Pin PD6 (D12 on Arduino LEONARDO)
@ D10
Pin PB6 (D10 on Arduino LEONARDO)
@ D7_PE6
Pin PE6 (D7 on Arduino LEONARDO)
@ D4_PD4
Pin PD4 (D4 on Arduino LEONARDO)
@ D9_PB5
Pin PB5 (D9 on Arduino LEONARDO)
@ SCK_PB1
Pin PB1 (SCK (SPI) on Arduino LEONARDO)
@ D7
Pin PE6 (D7 on Arduino LEONARDO)
@ D8_PB4
Pin PB4 (D8 on Arduino LEONARDO)
@ D3
Pin PD0 (D3 on Arduino LEONARDO)
@ D9
Pin PB5 (D9 on Arduino LEONARDO)
@ D11_PB7
Pin PB7 (D11 on Arduino LEONARDO)
@ D8
Pin PB4 (D8 on Arduino LEONARDO)
@ D13
Pin PC7 (D13 on Arduino LEONARDO)
@ D13_PC7
Pin PC7 (D13 on Arduino LEONARDO)
@ A3_PF4
Pin PF4 (A3 on Arduino LEONARDO)
@ D11
Pin PB7 (D11 on Arduino LEONARDO)
@ D2
Pin PD1 (D2 on Arduino LEONARDO)
@ A2
Pin PF5 (A2 on Arduino LEONARDO)
@ A5
Pin PF0 (A5 on Arduino LEONARDO)
@ D12_PD6
Pin PD6 (D12 on Arduino LEONARDO)
@ TXLED_PD5
Pin PD5 (TXLED on Arduino LEONARDO, no pin)
@ A5_PF0
Pin PF0 (A5 on Arduino LEONARDO)
@ A0
Pin PF7 (A0 on Arduino LEONARDO)
@ D6
Pin PD7 (D6 on Arduino LEONARDO)
@ D5
Pin PC6 (D5 on Arduino LEONARDO)
@ A2_PF5
Pin PF5 (A2 on Arduino LEONARDO)
AnalogClock
Defines available clocks of ATmega32u4, used for analog input.
AnalogPin
Defines all available analog input pins of ATmega32u4, with reference to Arduino LEONARDO pins.
@ A8_D8_ADC11
Pin ADC11 (D8 on Arduino LEONARDO)
@ A0_ADC7
Pin ADC7 (A0 on Arduino LEONARDO)
@ A11_D12_ADC9
Pin ADC9 (D12 on Arduino LEONARDO)
@ A3_ADC4
Pin ADC4 (A3 on Arduino LEONARDO)
@ A10_D10_ADC13
Pin ADC13 (D10 on Arduino LEONARDO)
@ A4_ADC1
Pin ADC1 (A4 on Arduino LEONARDO)
@ A9_D9_ADC12
Pin ADC12 (D9 on Arduino LEONARDO)
@ A5_ADC0
Pin ADC0 (A5 on Arduino LEONARDO)
@ TEMP
Temperature sensor.
@ A6_D4_ADC8
Pin ADC8 (D4 on Arduino LEONARDO)
@ A2_ADC5
Pin ADC5 (A2 on Arduino LEONARDO)
@ A1_ADC6
Pin ADC6 (A1 on Arduino LEONARDO)
@ A7_D6_ADC10
Pin ADC10 (D6 on Arduino LEONARDO)
@ BANDGAP
Bandgap reference.
InterruptPin
Defines all digital output pins of ATmega32u4, usable as pin change interrupt (PCI) pins.
USART
Defines all USART modules of ATmega32u4, actually only one.
Timer
Defines all "standard" timers available for ATmega32u4.
ExternalInterruptPin
Defines all digital output pins of ATmega32u4, usable as direct external interrupt pins.
SleepMode
Defines all available sleep modes for ATmega32u4.
@ EXTENDED_STANDBY
This mode is exactly the same as STANDBY.
@ 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 exactly the same as POWER_DOWN.
AnalogReference
Defines available voltage references of ATmega32u4, used for analog input.
@ INTERNAL_2_56V
Voltage reference is internal 2.56V 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.