MySensors Library & Examples  2.3.2-62-ge298769
Public Member Functions | List of all members
PinIO Class Reference

Detailed Description

AVR port I/O with runtime pin numbers.

Definition at line 39 of file PinIO.h.

#include <PinIO.h>

+ Collaboration diagram for PinIO:

Public Member Functions

 PinIO ()
 
 PinIO (uint8_t pin)
 
bool begin (uint8_t pin)
 
void config (uint8_t mode, bool data)
 
 __attribute__ ((always_inline)) bool read()
 
 __attribute__ ((always_inline)) void toggle()
 
 __attribute__ ((always_inline)) void highI()
 
 __attribute__ ((always_inline)) void lowI()
 
 __attribute__ ((always_inline)) void modeI(uint8_t mode)
 
 __attribute__ ((always_inline)) void writeI(bool level)
 
 __attribute__ ((always_inline)) void high()
 
 __attribute__ ((always_inline)) void low()
 
 __attribute__ ((always_inline)) void mode(uint8_t mode)
 
 __attribute__ ((always_inline)) void write(bool level)
 

Constructor & Destructor Documentation

◆ PinIO()

PinIO::PinIO ( )
inline

Create a PinIO object with no assigned pin.

Definition at line 44 of file PinIO.h.

Member Function Documentation

◆ __attribute__() [1/10]

PinIO::__attribute__ ( (always_inline)  )
inline
Returns
Pin's level

Definition at line 50 of file PinIO.h.

◆ __attribute__() [2/10]

PinIO::__attribute__ ( (always_inline)  )
inline

Set pin level high if output mode or enable 20K pullup if input mode.

This function will enable interrupts. This function should not be called in an ISR or where interrupts are disabled.

Definition at line 129 of file PinIO.h.

◆ __attribute__() [3/10]

PinIO::__attribute__ ( (always_inline)  )
inline

Set pin high if output mode or enable 20K pullup if input mode.

This function must be called with interrupts disabled. This function will not change the interrupt state.

Definition at line 73 of file PinIO.h.

◆ __attribute__() [4/10]

PinIO::__attribute__ ( (always_inline)  )
inline

Set pin level low if output mode or disable 20K pullup if input mode.

This function will enable interrupts. This function should not be called in an ISR or where interrupts are disabled.

Definition at line 143 of file PinIO.h.

◆ __attribute__() [5/10]

PinIO::__attribute__ ( (always_inline)  )
inline

Set pin low if output mode or disable 20K pullup if input mode.

This function must be called with interrupts disabled. This function will not change the interrupt state.

Definition at line 84 of file PinIO.h.

◆ __attribute__() [6/10]

PinIO::__attribute__ ( (always_inline)  )
inline

Set pin mode.

Parameters
[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.

This function will enable interrupts. This function should not be called in an ISR or where interrupts are disabled.

Definition at line 162 of file PinIO.h.

◆ __attribute__() [7/10]

PinIO::__attribute__ ( (always_inline)  )
inline

Set pin mode.

Parameters
[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.

This function must be called with interrupts disabled. This function will not change the interrupt state.

Definition at line 99 of file PinIO.h.

◆ __attribute__() [8/10]

PinIO::__attribute__ ( (always_inline)  )
inline

toggle a pin

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

Definition at line 61 of file PinIO.h.

◆ __attribute__() [9/10]

PinIO::__attribute__ ( (always_inline)  )
inline

Write pin.

Parameters
[in]levelIf output mode set pin high if true else low. If input mode enable 20K pullup if true else disable pullup.

This function will enable interrupts. This function should not be called in an ISR or where interrupts are disabled.

Definition at line 178 of file PinIO.h.

◆ __attribute__() [10/10]

PinIO::__attribute__ ( (always_inline)  )
inline

Write pin.

Parameters
[in]levelIf output mode set pin high if true else low. If input mode enable 20K pullup if true else disable pullup.

This function must be called with interrupts disabled. This function will not change the interrupt state.

Definition at line 117 of file PinIO.h.


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