FastArduino - ATtinyX4 Support v1.10
C++ library to build fast but small Arduino/AVR projects
|
Defines all types and constants specific to support ATtinyX4 MCU targets. More...
Enumerations | |
enum class | Port : uint8_t { PORT_A = 0 , PORT_B , NONE = UINT8_MAX } |
Defines all available ports of ATtinyX4. More... | |
enum class | DigitalPin : uint8_t { D0_PA0 = 0 , D1_PA1 , D2_PA2 , D3_PA3 , D4_PA4 , D5_PA5 , D6_PA6 , D7_PA7 , D8_PB0 , D9_PB1 , D10_PB2 , LED = D7_PA7 , NONE = UINT8_MAX } |
Defines all available digital input/output pins of ATtinyX4, with additional pin imaginary numbering (as for an Arduino board). 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 ATtinyX4, used for analog input. More... | |
enum class | AnalogReference : uint8_t { AREF = 0 , AVCC , INTERNAL_1_1V } |
Defines available voltage references of ATtinyX4, used for analog input. More... | |
enum class | AnalogPin : uint8_t { A0 = 0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , TEMP , BANDGAP , NONE = UINT8_MAX } |
Defines all available analog input pins of ATtinyX4, with reference to AVR ATtinyX4 pins. More... | |
enum class | PWMPin : uint8_t { D10_PB2_OC0A = 0 , D7_PA7_OC0B , D6_PA6_OC1A , D5_PA5_OC1B , NONE = UINT8_MAX } |
Defines all digital output pins of ATtinyX4, capable of PWM output. More... | |
enum class | ExternalInterruptPin : uint8_t { D10_PB2_EXT0 = 0 } |
Defines all digital output pins of ATtinyX4, usable as direct external interrupt pins. More... | |
enum class | InterruptPin : uint8_t { D0_PA0_PCI0 = uint8_t(DigitalPin::D0_PA0) , D1_PA1_PCI0 = uint8_t(DigitalPin::D1_PA1) , D2_PA2_PCI0 = uint8_t(DigitalPin::D2_PA2) , D3_PA3_PCI0 = uint8_t(DigitalPin::D3_PA3) , D4_PA4_PCI0 = uint8_t(DigitalPin::D4_PA4) , D5_PA5_PCI0 = uint8_t(DigitalPin::D5_PA5) , D6_PA6_PCI0 = uint8_t(DigitalPin::D6_PA6) , D7_PA7_PCI0 = uint8_t(DigitalPin::D7_PA7) , D8_PB0_PCI1 = uint8_t(DigitalPin::D8_PB0) , D9_PB1_PCI1 = uint8_t(DigitalPin::D9_PB1) , D10_PB2_PCI1 = uint8_t(DigitalPin::D10_PB2) } |
Defines all digital output pins of ATtinyX4, usable as pin change interrupt (PCI) pins. More... | |
enum class | USART : uint8_t |
Defines all USART modules of ATtinyX4, actually none at all. More... | |
enum class | Timer : uint8_t { TIMER0 = 0 , TIMER1 = 1 } |
Defines all timers available for ATtinyX4. 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_PWR_SAVE , EXTENDED_STANDBY = SLEEP_MODE_PWR_SAVE } |
Defines all available sleep modes for ATmega328P. More... | |
Functions | |
static void | init () |
Performs special initialization for ATtinyX4, actually nothing at all. More... | |
Defines all types and constants specific to support ATtinyX4 MCU targets.
|
strong |
Defines all available ports of ATtinyX4.
Enumerator | |
---|---|
PORT_A | Port A (8 IO) |
PORT_B | Port B (3 IO) |
Definition at line 55 of file attiny_x4.h.
|
strong |
Defines all available digital input/output pins of ATtinyX4, with additional pin imaginary numbering (as for an Arduino board).
Each symbol is in the form Dxx_Pyz
, where xx
is the imaginary pin number, y
is the port letter (B, C or D) and z
is the bit number for that pin within its port.
Definition at line 72 of file attiny_x4.h.
|
strong |
Defines available clocks of ATtinyX4, used for analog input.
Definition at line 105 of file attiny_x4.h.
|
strong |
Defines available voltage references of ATtinyX4, used for analog input.
Definition at line 117 of file attiny_x4.h.
|
strong |
Defines all available analog input pins of ATtinyX4, with reference to AVR ATtinyX4 pins.
Note that this includes also other sources than pin, e.g. the internal bandgap reference or the temperature sensor.
Definition at line 134 of file attiny_x4.h.
|
strong |
Defines all digital output pins of ATtinyX4, capable of PWM output.
Each symbol is in the form Dxx_Pyz_OCuv
, where xx
is the imaginary pin number , 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.
Definition at line 168 of file attiny_x4.h.
|
strong |
Defines all digital output pins of ATtinyX4, usable as direct external interrupt pins.
Each symbol is in the form Dxx_Pyz_EXTu
, where xx
is the imaginary pin number , y
is the port letter (B, C or D), 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 186 of file attiny_x4.h.
|
strong |
Defines all digital output pins of ATtinyX4, usable as pin change interrupt (PCI) pins.
Each symbol is in the form Dxx_Pyz_PCIu
, where xx
is the imaginary pin number, y
is the port letter (B, C or D), 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 199 of file attiny_x4.h.
|
strong |
Defines all USART modules of ATtinyX4, actually none at all.
Definition at line 218 of file attiny_x4.h.
|
strong |
Defines all timers available for ATtinyX4.
Enumerator | |
---|---|
TIMER0 | Timer0 (8 bits) |
TIMER1 | Timer1 (16 bits) |
Definition at line 227 of file attiny_x4.h.
|
strong |
Defines all available sleep modes for ATmega328P.
Definition at line 242 of file attiny_x4.h.
|
inlinestatic |
Performs special initialization for ATtinyX4, actually nothing at all.
This must be called first in your main()
function, even before sei()
. In general you should ALWAYS call this function at the beginning of your main()
even if you know it will not do anything; this will prevent strange behaviors when you want to port your code to another MCU target for which init()
does perform important initialization, e.g. ATmega32u4 (Arduino LEONARDO).
Definition at line 50 of file attiny_x4.h.