#include "PortExpanderSX1509.hpp"
|
Static Public Member Functions inherited from PortExpander |
static void | beginPin (int inPin, int inExpId, PIN_TYPE inType) |
|
static void | digitalWrite (int inPin, int inExpId, int inValue) |
|
static void | analogWrite (int inPin, int inExpId, int inValue) |
|
Protected Member Functions inherited from PortExpander |
virtual byte | begin () |
|
Static Protected Member Functions inherited from PortExpander |
static void | Add (PortExpander *inExpander) |
|
Protected Attributes inherited from PortExpander |
int | id |
|
This class describes a SX1509 circuit as an expander: a circuit which provides 16 outputs digital or analog. Each expander is identified by a number : the id. Only output pins are used in Accessories. This expander can provide digital and analog (pwm) output.
Definition at line 15 of file PortExpanderSX1509.hpp.
PortExpanderSX1509::PortExpanderSX1509 |
( |
| ) |
|
void PortExpanderSX1509::analogWrite |
( |
int |
inPin, |
|
|
int |
inValue |
|
) |
| |
|
virtual |
Set the value of one pin of the expander.
- Parameters
-
inPin | number of the pin. should be between 0 and the maximum number of expander pins. |
inValue | New analog value of the pin. Should be between 0 and 255. |
Implements PortExpander.
byte PortExpanderSX1509::begin |
( |
int |
inId, |
|
|
byte |
inAddress |
|
) |
| |
Initialize the instance of the expander.
- Parameters
-
inId | id of expander (to be used associated to pin). |
inAddress | I2C address used to communicate. |
- Returns
- True if the connection has been established, otherwise false.
void PortExpanderSX1509::beginPin |
( |
int |
inPin, |
|
|
PIN_TYPE |
inType |
|
) |
| |
|
virtual |
Initialize one pin of the expander.
- Parameters
-
inPin | number of the pin. should be between 0 and 15. |
inType | type of the output of this pin : only DIGITAL or ANALOG here. |
Implements PortExpander.
void PortExpanderSX1509::digitalWrite |
( |
int |
inPin, |
|
|
int |
inValue |
|
) |
| |
|
virtual |
Set the state of one pin of the expander.
- Parameters
-
inPin | number of the pin. should be between 0 and the maximum number of expander pins. |
inValue | New state of the pin. Should be HIGH (1) or LOW (0). |
Implements PortExpander.
The documentation for this class was generated from the following file: