IRPyro API
(sKEMLIB1)
Collection of routines and data structures covering the functionality of the IRPyro sensor
|
Master to slave read and write functions. More...
Functions | |
uint8_t | i2c_Read (uint8_t DeviceAddr, uint8_t Command, uint8_t *pBuffer, uint16_t len) |
Reads data via I2C port. More... | |
uint8_t | i2c_Write (uint8_t DeviceAddr, uint8_t Command, uint8_t *pBuffer, uint8_t len) |
Sends data via I2C port. More... | |
Master to slave read and write functions.
* The I2C implementation on the STM32F3 micro controllers * provides architecture independence to the IRPyro API *
uint8_t i2c_Read | ( | uint8_t | DeviceAddr, |
uint8_t | Command, | ||
uint8_t * | pBuffer, | ||
uint16_t | len | ||
) |
Reads data via I2C port.
DeviceAddr | Slave device address |
Command | First byte to be sent |
*pBuffer | Pointer to receiving bytes array |
len | Number of bytes to be received |
Pass/Fail | This function is used to receive an array of bytes over the I2C bus * of a given length. The function is responsible for setting up the * I2C transfer handling, i.e. calling the slave address and reading * the data if an ACK is received. * |
Definition at line 770 of file Micro_controller_template.c.
uint8_t i2c_Write | ( | uint8_t | DeviceAddr, |
uint8_t | Command, | ||
uint8_t * | pBuffer, | ||
uint8_t | len | ||
) |
Sends data via I2C port.
[in] | DeviceAddr | Slave device address |
[in] | Command | First byte to be sent |
[in,out] | *pBuffer | Remaining data bytes to be sent |
[in] | len | Number of bytes to be sent |
Pass/Fail | * This function sends an array of bytes over the I2C bus of a given * length. The function is responsible for setting up the I2C transfer * handling, i.e. calling the slave address and sending the data if an ACK is received. * |
Definition at line 679 of file Micro_controller_template.c.