Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otOptoShield Class Reference
[OptoShield - Opto isolated shield with eight power outputs and eight inputsOptoShield - Opto isolated shield with eight power outputs and eight inputs]

Class to manage opto isolated shield with eight power outputs and eight inputs.

#include <otOptoShield.h>

Inheritance diagram for otOptoShield:

otMCP23017

Public Member Functions

 otOptoShield ()
void init (U8 addressIndex=0)
void output (U8 pin, bool set)
U8 input (U8 pin)
U8 read ()

Constructor & Destructor Documentation

otOptoShield.otOptoShield  ) 
 

Create the class.


Member Function Documentation

void otOptoShield.init U8  addressIndex = 0  ) 
 

Set the base address

Parameters:
addressIndex Select which device is selected in the range 0:7

U8 otOptoShield.input U8  pin  ) 
 

Read the value of a specified input

Parameters:
pin Pin selection 0 to 7
Returns:
0 or 1

void otOptoShield.output U8  pin,
bool  set
 

Set or reset a specified output

Parameters:
pin Pin selection 0 to 7
set True set to 1 or false to 0

U8 otOptoShield.read  ) 
 

Read the input port.

Returns:
Port content. 0xFF if all inputs aren't connected.

Reimplemented from otMCP23017.


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0