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

TCS3400 Driver procedures. More...

#include "sarmfsw.h"
#include "TCS3400.h"
#include "shared_CLS.h"
Include dependency graph for TCS3400_proc.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  TCS3400_t
 TCS3400 user interface struct. More...
 

Macros

#define TCS34005_CHIP_ID   0x90U
 TCS34001/TCS34005 Chip ID to check against.
 
#define TCS34007_CHIP_ID   0x93U
 TCS34003/TCS34007 Chip ID to check against.
 
#define TCS3400_IR_COUNT   13.3f
 Counts per uW/cm2 for IR channel.
 
#define TCS3400_CLEAR_COUNT   14.0f
 Counts per uW/cm2 for Clear channel.
 
#define TCS3400_RED_COUNT   17.0f
 Counts per uW/cm2 for Red channel.
 
#define TCS3400_GREEN_COUNT   14.5f
 Counts per uW/cm2 for Green channel.
 
#define TCS3400_BLUE_COUNT   11.8f
 Counts per uW/cm2 for Blue channel.
 

Functions

FctERR TCS3400_Init_Sequence (TCS3400_t *const pCpnt)
 Initialization Sequence for TCS3400 peripheral.
 
uint32_t TCS3400_Get_Temp (const TCS3400_t *const pCpnt)
 Get current Color temperature (in Kelvin)
 
uint32_t TCS3400_Get_Lux (const TCS3400_t *const pCpnt)
 Get current Illuminance (in lux)
 
FctERR TCS3400_handler (TCS3400_t *const pCpnt)
 Handler for TCS3400 peripheral.
 
FctERR TCS3400_handler_it (TCS3400_t *const pCpnt)
 Handler for TCS3400 peripheral GPIO interrupt.
 
FctERR TCS3400_handler_all (void)
 Handler for all TCS3400 peripherals.
 
FctERR TCS3400_handler_it_all (void)
 Handler for all TCS3400 peripherals GPIO interrupt.
 

Variables

TCS3400_t TCS3400 [I2C_TCS3400_NB]
 TCS34000 User structure.
 

Detailed Description

TCS3400 Driver procedures.

Author
SMFSW

TCS3400: Color Light-to-Digital Converter

Macro Definition Documentation

◆ TCS34005_CHIP_ID

#define TCS34005_CHIP_ID   0x90U

TCS34001/TCS34005 Chip ID to check against.

◆ TCS34007_CHIP_ID

#define TCS34007_CHIP_ID   0x93U

TCS34003/TCS34007 Chip ID to check against.

◆ TCS3400_BLUE_COUNT

#define TCS3400_BLUE_COUNT   11.8f

Counts per uW/cm2 for Blue channel.

◆ TCS3400_CLEAR_COUNT

#define TCS3400_CLEAR_COUNT   14.0f

Counts per uW/cm2 for Clear channel.

◆ TCS3400_GREEN_COUNT

#define TCS3400_GREEN_COUNT   14.5f

Counts per uW/cm2 for Green channel.

◆ TCS3400_IR_COUNT

#define TCS3400_IR_COUNT   13.3f

Counts per uW/cm2 for IR channel.

◆ TCS3400_RED_COUNT

#define TCS3400_RED_COUNT   17.0f

Counts per uW/cm2 for Red channel.

Function Documentation

◆ TCS3400_Get_Lux()

uint32_t TCS3400_Get_Lux ( const TCS3400_t *const pCpnt)
inline

Get current Illuminance (in lux)

Parameters
[in]pCpnt- Pointer to TCS3400 component
Returns
FctERR - error code

◆ TCS3400_Get_Temp()

uint32_t TCS3400_Get_Temp ( const TCS3400_t *const pCpnt)
inline

Get current Color temperature (in Kelvin)

Parameters
[in]pCpnt- Pointer to TCS3400 component
Returns
FctERR - error code

◆ TCS3400_handler()

FctERR TCS3400_handler ( TCS3400_t *const pCpnt)

Handler for TCS3400 peripheral.

Weak Functions
TCS3400 handler may be user implemented to suit custom needs
Note
May be called periodically to handle TCS3400 tasks
Alternately may be called when event occurs on TCS3400 pin (or by calling TCS3400_handler_it instead)
Parameters
[in]pCpnt- Pointer to TCS3400 component
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TCS3400_handler_all()

FctERR TCS3400_handler_all ( void )

Handler for all TCS3400 peripherals.

Note
May be called periodically to handle all TCS3400 tasks
Returns
FctERR - error code
Here is the call graph for this function:

◆ TCS3400_handler_it()

FctERR TCS3400_handler_it ( TCS3400_t *const pCpnt)

Handler for TCS3400 peripheral GPIO interrupt.

Note
TCS3400_INT_GPIO_Init has to be called at init before using interrupt handler function
Weak Functions
TCS3400 GPIO interrupt handler may be user implemented to suit custom needs
Note
May be called periodically to handle TCS3400 tasks through interrupts
Parameters
[in]pCpnt- Pointer to TCS3400 component
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TCS3400_handler_it_all()

FctERR TCS3400_handler_it_all ( void )

Handler for all TCS3400 peripherals GPIO interrupt.

Note
TCS3400_INT_GPIO_Init has to be called at init before using interrupt handler function
May be called periodically to handle all TCS3400 tasks
Returns
FctERR - error code
Here is the call graph for this function:

◆ TCS3400_Init_Sequence()

FctERR TCS3400_Init_Sequence ( TCS3400_t *const pCpnt)

Initialization Sequence for TCS3400 peripheral.

Weak Functions
TCS3400 Init sequence may be user implemented if custom initialization sequence needed
Parameters
[in]pCpnt- Pointer to TCS3400 component
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ TCS3400

TCS3400_t TCS3400[I2C_TCS3400_NB]
extern

TCS34000 User structure.