#include "PortExpander.hpp"
|
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) |
|
|
virtual byte | begin () |
|
virtual void | beginPin (int inPin, PIN_TYPE inType) = 0 |
|
virtual void | digitalWrite (int inPin, int inValue) = 0 |
|
virtual void | analogWrite (int inPin, int inValue) = 0 |
|
|
static void | Add (PortExpander *inExpander) |
|
This class describes an expander : a circuit wich provides a lot of input/output pin for a small number of pins on the Arduino. Each expander is identified by a number : the id. Only output pins are used in Accessories. An expander can provide digital or analog (PWM) output.
Definition at line 21 of file PortExpander.hpp.
PortExpander::PortExpander |
( |
| ) |
|
virtual void PortExpander::analogWrite |
( |
int |
inPin, |
|
|
int |
inValue |
|
) |
| |
|
protectedpure 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. |
Implemented PortExpander74HC595, and PortExpanderSX1509.
static void PortExpander::analogWrite |
( |
int |
inPin, |
|
|
int |
inExpId, |
|
|
int |
inValue |
|
) |
| |
|
static |
Set the value of one pin of the given expander ID.
- Parameters
-
inPin | number of the pin. should be between 0 and the maximum number of expander pins. |
inExpId | id of the expander. should be a valid expander id. |
inValue | New analog value of the pin. Should be between 0 and 255. |
virtual byte PortExpander::begin |
( |
| ) |
|
|
inlineprotectedvirtual |
Initialize the instance of the expander.
- Parameters
-
inId | id of expander (to be used associated to pin). |
- Returns
- Is expander initialized ?
Definition at line 40 of file PortExpander.hpp.
virtual void PortExpander::beginPin |
( |
int |
inPin, |
|
|
PIN_TYPE |
inType |
|
) |
| |
|
protectedpure virtual |
Initialize one pin of the expander.
- Parameters
-
inPin | number of the pin. should be between 0 and the maximum number of expander pins. |
inType | type of the output of this pin : DIGITAL or ANALMOG (pwm). |
Implemented PortExpander74HC595, and PortExpanderSX1509.
static void PortExpander::beginPin |
( |
int |
inPin, |
|
|
int |
inExpId, |
|
|
PIN_TYPE |
inType |
|
) |
| |
|
static |
Initialize one pin of the expander.
- Parameters
-
inPin | number of the pin. should be between 0 and the maximum number of expander pins. |
inExpId | id of the expander. should be a valid expander id. |
inType | type of the output of this pin : DIGITAL or ANALMOG (pwm). |
virtual void PortExpander::digitalWrite |
( |
int |
inPin, |
|
|
int |
inValue |
|
) |
| |
|
protectedpure 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). |
Implemented PortExpander74HC595, and PortExpanderSX1509.
static void PortExpander::digitalWrite |
( |
int |
inPin, |
|
|
int |
inExpId, |
|
|
int |
inValue |
|
) |
| |
|
static |
Set the value of one pin of the given expander ID.
- Parameters
-
inPin | number of the pin. should be between 0 and the maximum number of expander pins. |
inExpId | id of the expander. should be a valid expander id. |
inValue | New state of the pin. Should be HIGH (1) or LOW (0). |
The documentation for this class was generated from the following file: