FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
board Namespace Reference

Defines all types and constants specific to support a specific MCU target. More...

Enumerations

enum class  Port : uint8_t
 Defines all available ports of the target MCU. More...
 
enum class  DigitalPin : uint8_t
 Defines all available digital input/output pins of the target MCU. More...
 
enum class  AnalogClock : uint8_t
 Defines available clocks of the target MCU, used for analog input. More...
 
enum class  AnalogReference : uint8_t
 Defines available voltage references of the target MCU, used for analog input. More...
 
enum class  AnalogPin : uint8_t
 Defines all available analog input pins of the target MCU. More...
 
enum class  PWMPin : uint8_t
 Defines all digital output pins of target MCU, capable of PWM output. More...
 
enum class  ExternalInterruptPin : uint8_t
 Defines all digital output pins of target MCU, usable as direct external interrupt pins. More...
 
enum class  InterruptPin : uint8_t
 Defines all digital output pins of target MCU, usable as pin change interrupt (PCI) pins. More...
 
enum class  USART : uint8_t
 Defines all USART modules of target MCU. More...
 
enum class  Timer : uint8_t
 Defines all timers available for target MCU. More...
 
enum class  SleepMode : uint8_t
 Defines all available sleep modes for target MCU. More...
 

Functions

static void init ()
 Performs special initialization for the target MCU. More...
 
template<DigitalPin PIN>
constexpr uint8_t BIT ()
 Determine the bit position, inside its IO port, of the given DigitalPin. More...
 
template<DigitalPin PIN>
constexpr uint8_t MASK ()
 Determine the bit mask representing the given DigitalPin inside its port. More...
 
template<ExternalInterruptPin EXT>
constexpr DigitalPin EXT_PIN ()
 Convert an ExternalInterruptPin to the matching DigitalPin. More...
 
template<InterruptPin PCI>
constexpr DigitalPin PCI_PIN ()
 Convert an InterruptPin to the matching DigitalPin. More...
 
template<PWMPin PWM>
constexpr DigitalPin PWM_PIN ()
 Convert an PWMPin to the matching DigitalPin. More...
 

Detailed Description

Defines all types and constants specific to support a specific MCU target.

This serves only as an example here; for actual targets, refer to proper header files in board directory, or refer refer to specific targets support section.

Enumeration Type Documentation

◆ Port

enum class board::Port : uint8_t
strong

Defines all available ports of the target MCU.

Definition at line 48 of file empty.h.

◆ DigitalPin

enum class board::DigitalPin : uint8_t
strong

Defines all available digital input/output pins of the target MCU.

Definition at line 55 of file empty.h.

◆ AnalogClock

enum class board::AnalogClock : uint8_t
strong

Defines available clocks of the target MCU, used for analog input.

Definition at line 62 of file empty.h.

◆ AnalogReference

enum class board::AnalogReference : uint8_t
strong

Defines available voltage references of the target MCU, used for analog input.

Definition at line 69 of file empty.h.

◆ AnalogPin

enum class board::AnalogPin : uint8_t
strong

Defines all available analog input pins of the target MCU.

Definition at line 76 of file empty.h.

◆ PWMPin

enum class board::PWMPin : uint8_t
strong

Defines all digital output pins of target MCU, capable of PWM output.

Definition at line 83 of file empty.h.

◆ ExternalInterruptPin

enum class board::ExternalInterruptPin : uint8_t
strong

Defines all digital output pins of target MCU, usable as direct external interrupt pins.

Definition at line 90 of file empty.h.

◆ InterruptPin

enum class board::InterruptPin : uint8_t
strong

Defines all digital output pins of target MCU, usable as pin change interrupt (PCI) pins.

Definition at line 97 of file empty.h.

◆ USART

enum class board::USART : uint8_t
strong

Defines all USART modules of target MCU.

This may be empty e.g. for ATtiny MCU.

Definition at line 104 of file empty.h.

◆ Timer

enum class board::Timer : uint8_t
strong

Defines all timers available for target MCU.

Definition at line 111 of file empty.h.

◆ SleepMode

enum class board::SleepMode : uint8_t
strong

Defines all available sleep modes for target MCU.

Definition at line 118 of file empty.h.

Function Documentation

◆ init()

static void board::init ( )
inlinestatic

Performs special initialization for the target MCU.

This must be called first in your main() function, even sei().

Definition at line 43 of file empty.h.

◆ BIT()

template<DigitalPin PIN>
constexpr uint8_t board::BIT ( )
constexpr

Determine the bit position, inside its IO port, of the given DigitalPin.

Definition at line 37 of file gpio.h.

◆ MASK()

template<DigitalPin PIN>
constexpr uint8_t board::MASK ( )
constexpr

Determine the bit mask representing the given DigitalPin inside its port.

Definition at line 45 of file gpio.h.

◆ EXT_PIN()

template<ExternalInterruptPin EXT>
constexpr DigitalPin board::EXT_PIN ( )
constexpr

Convert an ExternalInterruptPin to the matching DigitalPin.

Definition at line 93 of file int.h.

◆ PCI_PIN()

template<InterruptPin PCI>
constexpr DigitalPin board::PCI_PIN ( )
constexpr

Convert an InterruptPin to the matching DigitalPin.

Definition at line 98 of file pci.h.

◆ PWM_PIN()

template<PWMPin PWM>
constexpr DigitalPin board::PWM_PIN ( )
constexpr

Convert an PWMPin to the matching DigitalPin.

Definition at line 35 of file pwm.h.