USB Host Shield 2.0
Public Member Functions | List of all members
UHS2_GPIO Class Reference

#include <UHS2_gpio.h>

Public Member Functions

 UHS2_GPIO (USB *pUsb)
 Implement an instance of a UHS2_GPIO object. More...
 
void digitalWrite (uint8_t pin, uint8_t val)
 Set a GPIO output value. More...
 
int digitalRead (uint8_t pin)
 Read the value from a GPIO input pin. More...
 
int digitalReadOutput (uint8_t pin)
 Read the value from a GPIO output pin. More...
 

Detailed Description

Definition at line 32 of file UHS2_gpio.h.

Constructor & Destructor Documentation

◆ UHS2_GPIO()

UHS2_GPIO::UHS2_GPIO ( USB pUsb)

Implement an instance of a UHS2_GPIO object.

Parameters
pUSBPointer to a UHS2 USB object

Definition at line 32 of file UHS2_gpio.cpp.

Member Function Documentation

◆ digitalWrite()

void UHS2_GPIO::digitalWrite ( uint8_t  pin,
uint8_t  val 
)

Set a GPIO output value.

Parameters
pinGPIO output pin on USB Host Shield to set
valValue to set the pin to (zero value will clear output, non-zero value will assert output)

Definition at line 40 of file UHS2_gpio.cpp.

◆ digitalRead()

int UHS2_GPIO::digitalRead ( uint8_t  pin)

Read the value from a GPIO input pin.

Parameters
pinGPIO input pin on USB Host Shield to read
Return values
intValue of GPIO input (-1 on fail)

Definition at line 55 of file UHS2_gpio.cpp.

◆ digitalReadOutput()

int UHS2_GPIO::digitalReadOutput ( uint8_t  pin)

Read the value from a GPIO output pin.

Parameters
pinGPIO output pin on USB Host Shield to read
Return values
intValue of GPIO output (-1 on fail)
Note
Value of MAX3421E output register, i.e. what the device has been set to, not the physical value on the pin

Definition at line 68 of file UHS2_gpio.cpp.


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