Arduino Pin Library  v4.2.0
An easy to use Arduino library for fast and simultaneous operations on Arduino I/O pins.
Pin.h File Reference

Fast operations on Arduino I/O pins. More...

#include "Arduino.h"
Include dependency graph for Pin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  Pin
 Class for fast operations on Arduino I/O pins. More...
 

Macros

#define DDR_HIGH   (*_DDR |= _offset)
 Set the DDR register to HIGH for the pin. More...
 
#define DDR_TOGGLE   (*_DDR ^= _offset)
 Set the DDR register to the inverse for the pin. More...
 
#define DDR_LOW   (*_DDR &= _ioffset)
 Set the DDR register to LOW for the pin. More...
 
#define PORT_HIGH   (*_PORT |= _offset)
 Set the PORT register to HIGH for the pin. More...
 
#define PORT_TOGGLE   (*_PORT ^= _offset)
 Set the PORT register to the inverse for the pin. More...
 
#define PORT_LOW   (*_PORT &= _ioffset)
 Set the PORT register to LOW for the pin. More...
 
#define DDR_ON   (*_DDR & _offset)
 Get the DDR register for the pin (HIGH, LOW) with other pins forced to 0. More...
 
#define DDR_OFF   (*_DDR | _ioffset)
 Get the DDR register for the pin (HIGH, LOW) with other pins forced to 1. More...
 
#define PORT_ON   (*_PORT & _offset)
 Get the PORT register for the pin (HIGH, LOW) with other pins forced to 0. More...
 
#define PORT_OFF   (*_PORT | _ioffset)
 Get the PORT register for the pin (HIGH, LOW) with other pins forced to 1. More...
 
#define PIN_ON   (*_PIN & _offset)
 Get the PIN register for the pin (HIGH, LOW) with other pins forced to 0. More...
 
#define PIN_OFF   (*_PIN | _ioffset)
 Get the PIN register for the pin (HIGH, LOW) with other pins forced to 1. More...
 

Detailed Description

Fast operations on Arduino I/O pins.

Author
Alec Fenichel

Definition in file Pin.h.

Macro Definition Documentation

§ DDR_HIGH

#define DDR_HIGH   (*_DDR |= _offset)

Set the DDR register to HIGH for the pin.

Definition at line 16 of file Pin.h.

§ DDR_LOW

#define DDR_LOW   (*_DDR &= _ioffset)

Set the DDR register to LOW for the pin.

Definition at line 18 of file Pin.h.

§ DDR_OFF

#define DDR_OFF   (*_DDR | _ioffset)

Get the DDR register for the pin (HIGH, LOW) with other pins forced to 1.

Definition at line 25 of file Pin.h.

§ DDR_ON

#define DDR_ON   (*_DDR & _offset)

Get the DDR register for the pin (HIGH, LOW) with other pins forced to 0.

Definition at line 24 of file Pin.h.

§ DDR_TOGGLE

#define DDR_TOGGLE   (*_DDR ^= _offset)

Set the DDR register to the inverse for the pin.

Definition at line 17 of file Pin.h.

§ PIN_OFF

#define PIN_OFF   (*_PIN | _ioffset)

Get the PIN register for the pin (HIGH, LOW) with other pins forced to 1.

Definition at line 31 of file Pin.h.

§ PIN_ON

#define PIN_ON   (*_PIN & _offset)

Get the PIN register for the pin (HIGH, LOW) with other pins forced to 0.

Definition at line 30 of file Pin.h.

§ PORT_HIGH

#define PORT_HIGH   (*_PORT |= _offset)

Set the PORT register to HIGH for the pin.

Definition at line 20 of file Pin.h.

§ PORT_LOW

#define PORT_LOW   (*_PORT &= _ioffset)

Set the PORT register to LOW for the pin.

Definition at line 22 of file Pin.h.

§ PORT_OFF

#define PORT_OFF   (*_PORT | _ioffset)

Get the PORT register for the pin (HIGH, LOW) with other pins forced to 1.

Definition at line 28 of file Pin.h.

§ PORT_ON

#define PORT_ON   (*_PORT & _offset)

Get the PORT register for the pin (HIGH, LOW) with other pins forced to 0.

Definition at line 27 of file Pin.h.

§ PORT_TOGGLE

#define PORT_TOGGLE   (*_PORT ^= _offset)

Set the PORT register to the inverse for the pin.

Definition at line 21 of file Pin.h.