|
| Pin () |
| Default constructor.
|
|
| Pin (uint8_t number) |
| Arduino supported board constructor.
|
|
| Pin (uint8_t number, uint8_t offset, uint8_t timer, volatile uint8_t *PIN, volatile uint8_t *PORT, volatile uint8_t *DDR) |
| Custom board constructor.
|
|
| operator bool () const |
| Get the value of the pin from the PIN register.
|
|
Pin & | operator= (uint8_t state) |
| Set the pin state.
|
|
uint8_t | getNumber () |
| Get the pin number.
|
|
uint8_t | getOffset () |
| Get the pin offset.
|
|
uint8_t | getInverseOffset () |
| Get the inverse pin offset.
|
|
uint8_t | getTimer () |
| Get the pin timer.
|
|
volatile uint8_t * | getPIN () |
| Get a pointer to the PIN register.
|
|
volatile uint8_t * | getPORT () |
| Get a pointer to the PORT register.
|
|
volatile uint8_t * | getDDR () |
| Get a pointer to the DDR register.
|
|
uint8_t | getMode () |
| Get the mode of the pin from the DDR register.
|
|
uint8_t | getState () |
| Get the state of the pin from the PORT register.
|
|
uint8_t | getValue () |
| Get the value of the pin from the PIN register.
|
|
uint16_t | getAnalogValue () |
| Get the analog value of the pin.
|
|
void | set (uint8_t mode, uint8_t state) |
| Set the pin mode and pin state.
|
|
void | setMode (uint8_t mode) |
| Set the pin mode.
|
|
void | setState (uint8_t state) |
| Set the pin state.
|
|
void | setInput () |
| Set the pin mode to input.
|
|
void | setPullupOn () |
| Set the pin pullup resistor to on.
|
|
void | setPullupOff () |
| Set the pin pullup resistor to off.
|
|
void | setInputPullupOn () |
| Set the pin mode to input and the pin pullup resistor to on.
|
|
void | setInputPullupOff () |
| Set the pin mode to input and the pin pullup resistor to off.
|
|
void | setOutput () |
| Set the pin mode to output.
|
|
void | setHigh () |
| Set the pin output to HIGH.
|
|
void | setLow () |
| Set the pin output to LOW.
|
|
void | setOutputHigh () |
| Set the pin mode to output and the pin output to HIGH.
|
|
void | setOutputLow () |
| Set the pin mode to output and the pin output to LOW.
|
|
void | setDutyCycle (int value) |
| Set the PWM duty cycle.
|
|
void | toggleMode () |
| Toggle the pin mode (OUTPUT -> INPUT, INPUT -> OUTPUT)
|
|
void | toggleState () |
| Toggle the pin state (HIGH -> LOW, LOW -> HIGH)
|
|
volatile unsigned int | rcTimer (volatile unsigned int count) |
| Set the pin mode to input and decrement a counter until the pin goes HIGH or the counter reaches 0 then set the pin mode to output and return the counter value.
|
|
Class for fast operations on Arduino I/O pins.
- Author
- Alec Fenichel
- Examples
- Pin-Analog.ino, Pin-Array.ino, Pin-Custom.ino, Pin-Group.ino, Pin-PWM.ino, Pin-Timer.ino, and Pin-Toggle.ino.
Definition at line 40 of file Pin.h.