|
LOGGER
Logger
Data Logging using ESP8266
|
#include "basetype.h"Go to the source code of this file.
Functions | |
| void | tca9539init () |
| < version of this include file More... | |
| uint32_t | tca9539readPin (uint8_t *pUniqueID, uint8_t pinNumber) |
| int32_t | tca9539getDesiredOutputs (uint8_t address) |
| bool | tca9539setDesiredOutputs (uint8_t address, uint16_t value) |
| int32_t | tca9539getConfiguration (uint8_t address) |
| bool | tca9539setConfiguration (uint8_t address, uint16_t value) |
| bool | tca9539dumpState (Print *pPrinter, uint8_t address) |
| void | tca9539emitConfiguror (Print *pPrint, uint8_t pinIndex, bool setIOconfig, bool ioIsOutput, bool ioIsOn) |
| void | tca9539checkPinChanges () |
Support for the TCA9539 I/O expander chip. This chip is an I2C device.
| void tca9539checkPinChanges | ( | ) |
Check pin changes. Call this when changes in sensors have been detected. This may be called when no changes in pin state have occured.
NOTE: knowlege that address 0x77 pins 16 and 17 are pulse counting pins is buried inside this module.
| bool tca9539dumpState | ( | Print * | pPrinter, |
| uint8_t | address | ||
| ) |
print the current state of a device
| pPrinter | where to send the output |
| address | I2C address of the device to print |
| void tca9539emitConfiguror | ( | Print * | pPrint, |
| uint8_t | pinIndex, | ||
| bool | setIOconfig, | ||
| bool | ioIsOutput, | ||
| bool | ioIsOn | ||
| ) |
Emit the display and configuration for a TCA pin.
| pPrint | where to print the selector |
| pinIndex | current selected data type as an integer |
| setIOconfig | true to set the IO configuration or pin state |
| ioIsOutput | true if pin is an output |
| ioIsOn | true if intended value is on |
| int32_t tca9539getConfiguration | ( | uint8_t | address | ) |
Get the current device pin configuration. The data is read from a data structure and reported. A one in any bit position indicates that the bit is configured as an input.
| address | I2C address of the device to read |
| int32_t tca9539getDesiredOutputs | ( | uint8_t | address | ) |
Get the current device desired output state. The data is read from a data structure and reported.
| address | I2C address of the device to read |
| void tca9539init | ( | ) |
< version of this include file
Initialize I/O expander devices. Find the devices and put them into the list of devices.
| uint32_t tca9539readPin | ( | uint8_t * | pUniqueID, |
| uint8_t | pinNumber | ||
| ) |
Read a pin of the tca9539 part.
The uniqueID is an 8 byte array. The first bytes are the MAC address of this processor. The last byte is the I2C address for the specific part to read.
Pin number 0 is the lowest order bit. Pin number 15 is the highest order bit.
| pUniqueID | ID of the part to read |
| pinNumber | pin number to read |
| bool tca9539setConfiguration | ( | uint8_t | address, |
| uint16_t | value | ||
| ) |
Set the configuration of all pins. The configuration is logged in a data structure and is also sent to the device. A one in any bit position indicated that the pin is an input.
| address | I2C address of the device to update |
| value | New value for the pin configuration |
| bool tca9539setDesiredOutputs | ( | uint8_t | address, |
| uint16_t | value | ||
| ) |
Set the desired state of all output pins. The state is logged in a data structure and is also sent to the device.
| address | I2C address of the device to update |
| value | new value for the desired outputs state |
1.8.10