I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
TCS3472.c File Reference

TCS3472 Driver. More...

#include "TCS3472.h"
Include dependency graph for TCS3472.c:

Functions

FctERR TCS3472_Init (const uint8_t idx, I2C_HandleTypeDef *const hi2c, const uint16_t devAddress)
 Initialization for TCS3472 peripheral.
 
FctERR TCS3472_Init_Single (void)
 Initialization for TCS3472 peripheral.
 
FctERR TCS3472_Write (I2C_slave_t *const pSlave, const uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Write function for TCS3472.
 
FctERR TCS3472_Read (I2C_slave_t *const pSlave, uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Read function for TCS3472.
 
FctERR TCS3472_Write_Word (I2C_slave_t *const pSlave, const uint16_t *data, const uint16_t addr)
 I2C Word Write (little endian) function for TCS3472.
 
FctERR TCS3472_Read_Word (I2C_slave_t *const pSlave, uint16_t *data, const uint16_t addr)
 I2C Word Read (little endian) function for TCS3472.
 
FctERR TCS3472_Write_Special (I2C_slave_t *const pSlave, const TCS3472_spec_func func)
 I2C Special function Write function for TCS3472.
 

Detailed Description

TCS3472 Driver.

Author
SMFSW

TCS3472: Color light-to-digital converter with IR filter

Function Documentation

◆ TCS3472_Init()

FctERR TCS3472_Init ( const uint8_t idx,
I2C_HandleTypeDef *const hi2c,
const uint16_t devAddress )

Initialization for TCS3472 peripheral.

Parameters
[in]idx- TCS3472 index
[in]hi2c- pointer to TCS3472 I2C instance
[in]devAddress- TCS3472 device address
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TCS3472_Init_Single()

FctERR TCS3472_Init_Single ( void )

Initialization for TCS3472 peripheral.

Warning
In case multiple devices (defined by I2C_TCS3472_NB > 1), you shall use TCS3472_Init instead
Returns
FctERR - error code
Here is the call graph for this function:

◆ TCS3472_Read()

FctERR TCS3472_Read ( I2C_slave_t *const pSlave,
uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Read function for TCS3472.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in,out]data- pointer to read to
[in]addr- Address to read from
[in]nb- Number of bytes to read
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TCS3472_Read_Word()

FctERR TCS3472_Read_Word ( I2C_slave_t *const pSlave,
uint16_t * data,
const uint16_t addr )

I2C Word Read (little endian) function for TCS3472.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in,out]data- pointer to read to
[in]addr- Address to read from
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TCS3472_Write()

FctERR TCS3472_Write ( I2C_slave_t *const pSlave,
const uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Write function for TCS3472.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in]data- pointer to write from
[in]addr- Address to write to
[in]nb- Number of bytes to write
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TCS3472_Write_Special()

FctERR TCS3472_Write_Special ( I2C_slave_t *const pSlave,
const TCS3472_spec_func func )

I2C Special function Write function for TCS3472.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in]func- special function to execute
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TCS3472_Write_Word()

FctERR TCS3472_Write_Word ( I2C_slave_t *const pSlave,
const uint16_t * data,
const uint16_t addr )

I2C Word Write (little endian) function for TCS3472.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in]data- pointer to write from
[in]addr- Address to write to
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: