FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
interrupt::PCIType< PIN > Struct Template Reference

Helper class that easily converts a PIN into the right PCISignal. More...

#include <fastarduino/pci.h>

Public Types

using TYPE = PCISignal< PCINT >
 PCISignal type for PIN. More...
 

Static Public Attributes

static constexpr const uint8_t PCINT = PORT_TRAIT::PCINT
 PCINT vector number for this PIN More...
 

Detailed Description

template<board::InterruptPin PIN>
struct interrupt::PCIType< PIN >

Helper class that easily converts a PIN into the right PCISignal.

The following snippet demonstrates usage of PCIType to declare a PCISignal instance for later use in a function:

void f()
{
constexpr const board::InterruptPin PIN = board::InterruptPin::D7;
pci.enable_pin<PIN>();
pci.enable();
...
pci.disable();
}
Handler of a Pin Change Interrupt vector.
Definition: pci.h:177
void enable()
Enable pin change interrupts handled by this PCISignal.
Definition: pci.h:211
void disable()
Disable all pin change interrupts handled by this PCISignal.
Definition: pci.h:228
void enable_pin()
Enable Pin Change Interrupts for PIN.
Definition: pci.h:328
InterruptPin
Defines all digital output pins of target MCU, usable as pin change interrupt (PCI) pins.
Definition: empty.h:98
See also
board::InterruptPin
PCI_SIGNAL

Definition at line 533 of file pci.h.

Member Typedef Documentation

◆ TYPE

template<board::InterruptPin PIN>
using interrupt::PCIType< PIN >::TYPE = PCISignal<PCINT>

PCISignal type for PIN.

Definition at line 543 of file pci.h.

Member Data Documentation

◆ PCINT

template<board::InterruptPin PIN>
constexpr const uint8_t interrupt::PCIType< PIN >::PCINT = PORT_TRAIT::PCINT
staticconstexpr

PCINT vector number for this PIN

Definition at line 541 of file pci.h.


The documentation for this struct was generated from the following file: