Soldered SD Card Arduino Library 1.0.0
Easily read and write files to and form the SD card breakout! A fork of the original SDFat library by Bill Greiman.
Loading...
Searching...
No Matches
Fast Pin I/O

Classes

struct  GpioPinMap_t
 

Functions

void badPinNumber (void) __attribute__((error("Pin number is too large or not a const ant")))
 
static __attribute__ ((always_inline)) void badPinCheck(uint8_t pin)
 
 if (address > reinterpret_cast< uint8_t * >(0X3F))
 
 if (level)
 
 if (mode !=OUTPUT)
 

Variables

static uint8_t mask
 
static uint8_t bool level
 
 else
 
static uint8_t mode
 
static bool value
 

Detailed Description

Fast Digital I/O functions and template class.

Function Documentation

◆ __attribute__()

static __attribute__ ( (always_inline)  )
inlinestatic

Check for valid pin number

Parameters
[in]pinNumber of pin to be checked.

DDR register address

Parameters
[in]pinArduino pin number
Returns
register address

Bit mask for pin

Parameters
[in]pinArduino pin number
Returns
mask

PIN register address

Parameters
[in]pinArduino pin number
Returns
register address

PORT register address

Parameters
[in]pinArduino pin number
Returns
register address

Fast write helper.

Parameters
[in]addressI/O register address
[in]maskbit mask for pin
[in]levelvalue for bit

Read pin value.

Parameters
[in]pinArduino pin number
Returns
value read

Toggle a pin.

Parameters
[in]pinArduino pin number

If the pin is in output mode toggle the pin level. If the pin is in input mode toggle the state of the 20K pullup.

Set pin value.

Parameters
[in]pinArduino pin number
[in]levelvalue to write

Write the DDR register.

Parameters
[in]pinArduino pin number
[in]levelvalue to write

Set pin mode.

Parameters
[in]pinArduino pin number
[in]modeINPUT, OUTPUT, or INPUT_PULLUP.

The internal pullup resistors will be enabled if mode is INPUT_PULLUP and disabled if the mode is INPUT.

read pin value

Parameters
[in]pinArduino pin number
Returns
value read

Set pin value

Parameters
[in]pinArduino pin number
[in]levelvalue to write

◆ badPinNumber()

void badPinNumber ( void  ) const

generate bad pin number error

◆ if() [1/3]

if ( address  ,
reinterpret_cast< uint8_t * >  0X3F 
)

◆ if() [2/3]

if ( level  )

◆ if() [3/3]

if ( mode = OUTPUT)

Variable Documentation

◆ else

else
Initial value:
{
*address &= ~mask

◆ level

static bool level
Initial value:
{
uint8_t s

◆ mask

uint8_t mask

◆ mode

uint8_t mode
Initial value:
{
fastDdrWrite(pin, mode == OUTPUT)
static uint8_t mode
Definition DigitalPin.h:186

◆ value

bool value