MySensors Library & Examples  2.3.2
Public Member Functions | Static Public Member Functions | List of all members
RPiClass Class Reference

Detailed Description

RPi class.

Definition at line 29 of file RPi.h.

#include <RPi.h>

+ Collaboration diagram for RPiClass:

Public Member Functions

void pinMode (uint8_t physPin, uint8_t mode)
 Configures the specified pin to behave either as an input or an output. More...
 
void digitalWrite (uint8_t physPin, uint8_t value)
 Write a high or a low value for the given pin. More...
 
uint8_t digitalRead (uint8_t physPin)
 Reads the value from a specified pin. More...
 
uint8_t digitalPinToInterrupt (uint8_t physPin)
 Translate the physical pin number to the GPIO number for use in interrupt. More...
 

Static Public Member Functions

static int physToGPIO (uint8_t physPin, uint8_t *gpio)
 Translate the physical pin number to the GPIO number. More...
 

Member Function Documentation

◆ digitalPinToInterrupt()

uint8_t RPiClass::digitalPinToInterrupt ( uint8_t  physPin)

Translate the physical pin number to the GPIO number for use in interrupt.

Parameters
physPinThe physical number of the pin.
Returns
The GPIO pin number.

◆ digitalRead()

uint8_t RPiClass::digitalRead ( uint8_t  physPin)

Reads the value from a specified pin.

Parameters
physPinThe physical number of the pin.
Returns
HIGH or LOW.

◆ digitalWrite()

void RPiClass::digitalWrite ( uint8_t  physPin,
uint8_t  value 
)

Write a high or a low value for the given pin.

Parameters
physPinThe physical number of the pin.
valueHIGH or LOW.

◆ physToGPIO()

static int RPiClass::physToGPIO ( uint8_t  physPin,
uint8_t *  gpio 
)
static

Translate the physical pin number to the GPIO number.

Parameters
physPinThe physical number of the pin.
gpioPointer to write the GPIO pin number when success.
Returns
-1 if FAILURE or 0 if SUCCESS.

◆ pinMode()

void RPiClass::pinMode ( uint8_t  physPin,
uint8_t  mode 
)

Configures the specified pin to behave either as an input or an output.

Parameters
physPinThe physical number of the pin.
modeINPUT or OUTPUT.

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