wpi-32u4-library
Typedefs | Functions | Variables
pcint.cpp File Reference
#include <pcint.h>

Go to the source code of this file.

Typedefs

typedef void(* PCISR) (void)
 

Functions

void attachPCInt (uint8_t pcInt, void(*pcisr)(void))
 Attaches a function to a pin change interrupt. More...
 
 ISR (PCINT0_vect)
 
uint8_t digitalPinToPCInterrupt (uint8_t pin)
 

Variables

PCISR pcISR [] = {0, 0, 0, 0, 0, 0, 0, 0}
 
static volatile uint8_t lastB = PINB
 

Typedef Documentation

◆ PCISR

typedef void(* PCISR) (void)

Definition at line 4 of file pcint.cpp.

Function Documentation

◆ attachPCInt()

void attachPCInt ( uint8_t  pcInt,
void(*)(void)  pcisr 
)

Attaches a function to a pin change interrupt.

Parameters
pcIntThe specific pin change interrupt, e.g., "PCINT3"
pcisrA pointer to the ISR function, of type void fxn(void).

Definition at line 12 of file pcint.cpp.

References lastB, and pcISR.

Referenced by IRDecoder::init(), Rangefinder::init(), and Romi32U4Motor::initEncoders().

◆ digitalPinToPCInterrupt()

uint8_t digitalPinToPCInterrupt ( uint8_t  pin)

Definition at line 53 of file pcint.cpp.

Referenced by IRDecoder::init(), and Rangefinder::init().

◆ ISR()

ISR ( PCINT0_vect  )

Definition at line 28 of file pcint.cpp.

References lastB, and pcISR.

Variable Documentation

◆ lastB

volatile uint8_t lastB = PINB
static

Definition at line 10 of file pcint.cpp.

Referenced by attachPCInt(), and ISR().

◆ pcISR

PCISR pcISR[] = {0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 7 of file pcint.cpp.

Referenced by attachPCInt(), and ISR().