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

Detailed Description

BCM class.

Definition at line 32 of file BCM.h.

#include <BCM.h>

+ Collaboration diagram for BCMClass:

Public Member Functions

 ~BCMClass ()
 BCMClass destructor.
 
uint8_t init ()
 Initializes BCM. More...
 
void pinMode (uint8_t gpio, uint8_t mode)
 Configures the specified pin to behave either as an input or an output. More...
 
void digitalWrite (uint8_t gpio, uint8_t value)
 Write a high or a low value for the given pin. More...
 
uint8_t digitalRead (uint8_t gpio)
 Reads the value from a specified pin. More...
 
uint8_t digitalPinToInterrupt (uint8_t gpio)
 Returns the same GPIO, no conversion is required. More...
 
uint8_t isInitialized ()
 Checks if SPI was initialized. More...
 

Member Function Documentation

◆ digitalPinToInterrupt()

uint8_t BCMClass::digitalPinToInterrupt ( uint8_t  gpio)
inline

Returns the same GPIO, no conversion is required.

Parameters
gpioThe GPIO pin number.
Returns
The GPIO pin number.

Definition at line 85 of file BCM.h.

◆ digitalRead()

uint8_t BCMClass::digitalRead ( uint8_t  gpio)

Reads the value from a specified pin.

Parameters
gpioThe GPIO pin number.
Returns
HIGH or LOW.

◆ digitalWrite()

void BCMClass::digitalWrite ( uint8_t  gpio,
uint8_t  value 
)

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

Parameters
gpioThe GPIO pin number.
valueHIGH or LOW.

◆ init()

uint8_t BCMClass::init ( )

Initializes BCM.

Returns
1 if successful, else exits the program.

◆ isInitialized()

uint8_t BCMClass::isInitialized ( )

Checks if SPI was initialized.

Returns
1 if initialized, else 0.

◆ pinMode()

void BCMClass::pinMode ( uint8_t  gpio,
uint8_t  mode 
)

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

Parameters
gpioThe GPIO pin number.
modeINPUT or OUTPUT.

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