|
LOGGER
Logger
Data Logging using ESP8266
|
#include "basetype.h"Go to the source code of this file.
Functions | |
| void | i2cservicesInit () |
| < version of this include file More... | |
| void | i2cservicesLoop () |
| void | sendToSlave (uint8_t slaveAddress, uint16_t numBytes, const char *pBytes) |
| void | i2cPoll (uint8_t i2cAddress) |
| void | i2cWriteAddress (uint8_t i2cAddress, uint8_t romAddress) |
| uint8_t | i2cReadData (uint8_t i2cAddress, size_t count, uint8_t *pData, uint8_t romAddress=0) |
| uint8_t | i2cReadDataByBytes (uint8_t i2cAddress, size_t count, uint8_t *pData, uint8_t romAddress=0) |
| void | i2cWriteData (uint8_t i2cAddress, size_t count, uint8_t *pData, uint8_t romAddress, const char *pError=NULL) |
| void | i2cWriteBlock (uint8_t i2cAddress, size_t count, uint8_t *pData, uint8_t romAddress, const char *pError=NULL) |
| void | i2cDumpWireError (const char *pMsg=NULL) |
Interrupt based spying on an I2C pin pair
| void i2cDumpWireError | ( | const char * | pMsg | ) |
Dump any error condition from I2C driver
| pMsg | pointer to initial message string |
| void i2cPoll | ( | uint8_t | i2cAddress | ) |
Poll an i2c device by issuing a simple read operation. A single byte is read after the read.
| i2cAddress | I2C address of part |
| uint8_t i2cReadData | ( | uint8_t | i2cAddress, |
| size_t | count, | ||
| uint8_t * | pData, | ||
| uint8_t | romAddress = 0 |
||
| ) |
Read data from an I2C device
| i2cAddress | I2C address of part |
| count | number of bytes to read |
| pData | pointer to buffer to put data in |
| romAddress | address in ROM of first byte |
| uint8_t i2cReadDataByBytes | ( | uint8_t | i2cAddress, |
| size_t | count, | ||
| uint8_t * | pData, | ||
| uint8_t | romAddress = 0 |
||
| ) |
Read data from an I2C device. This is the same as i2cReadData, but, reads the data one byte at a time. This is useful for devices that do not allow for incrementing the address over a full range of addresses.
| i2cAddress | I2C address of part |
| count | number of bytes to read |
| pData | pointer to buffer to put data in |
| romAddress | address in ROM of first byte |
| void i2cservicesInit | ( | ) |
< version of this include file
Initialize I2C communication services.
| void i2cservicesLoop | ( | ) |
call this from the main loop to service I2C communication events in a non interrupt context
| void i2cWriteAddress | ( | uint8_t | i2cAddress, |
| uint8_t | romAddress | ||
| ) |
Write an address to an I2C device
| i2cAddress | I2C address of part |
| romAddress | memory address to send to the part |
Write an address to an I2C device
| romAddress | memory address to send to the part |
| i2cAddress | I2C address of part |
| void i2cWriteBlock | ( | uint8_t | i2cAddress, |
| size_t | count, | ||
| uint8_t * | pData, | ||
| uint8_t | romAddress, | ||
| const char * | pError = NULL |
||
| ) |
Write a block of data to an I2C device
| i2cAddress | I2C address of part reading from |
| count | number of bytes |
| pData | pointer to data to write |
| romAddress | address in ROM of first byte |
| pError | pointer to text to use in error message (may be NULL) |
| void i2cWriteData | ( | uint8_t | i2cAddress, |
| size_t | count, | ||
| uint8_t * | pData, | ||
| uint8_t | romAddress, | ||
| const char * | pError = NULL |
||
| ) |
Write data to an I2C device, this writes a byte at a time.
| i2cAddress | I2C address of part reading from |
| count | number of bytes |
| pData | pointer to data to write |
| romAddress | address in ROM of first byte |
| pError | pointer to text to use in error message (may be NULL) |
| void sendToSlave | ( | uint8_t | slaveAddress, |
| uint16_t | numBytes, | ||
| const char * | pBytes | ||
| ) |
Send a block of bytes to an I2C slave
| slaveAddress | 7 bit I2C address of the slave |
| numBytes | number of bytes to send |
| pBytes | pointer to block of bytes |
1.8.10