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

TSL2591 Driver procedures. More...

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

Data Structures

struct  TSL2591_t
 TSL2591 user interface struct. More...
 

Macros

#define TSL2591_CHIP_ID   0x50U
 TSL2591 Chip ID to check against.
 
#define TSL2591_DEVICE_FACTOR   53U
 TSL2591 Device factor.
 
#define TSL2591_CH0_COUNTS   264.1f
 Counts per uW/cm2 for CH0 (Full spectrum)
 
#define TSL2591_CH1_COUNTS   34.9f
 Counts per uW/cm2 for CH1 (IR)
 

Functions

FctERR TSL2591_Init_Sequence (TSL2591_t *const pCpnt)
 Initialization Sequence for TSL2591 peripheral.
 
void TSL2591_Set_CPL (TSL2591_t *const pCpnt)
 Set proper CPL value (Counts per kiloLux)
 
uint32_t TSL2591_Get_Lux (const TSL2591_t *const pCpnt)
 Get current Illuminance (in lux)
 
FctERR TSL2591_handler (TSL2591_t *const pCpnt)
 Handler for TSL2591 peripheral.
 
FctERR TSL2591_handler_it (TSL2591_t *const pCpnt)
 Handler for TSL2591 peripheral GPIO interrupt.
 
FctERR TSL2591_handler_all (void)
 Handler for all TSL2591 peripherals.
 
FctERR TSL2591_handler_it_all (void)
 Handler for all TSL2591 peripherals GPIO interrupt.
 

Variables

TSL2591_t TSL2591 [I2C_TSL2591_NB]
 TSL2591 User structure.
 

Detailed Description

TSL2591 Driver procedures.

Author
SMFSW

TSL2591: Very-high sensitivity light-to-digital converter

Macro Definition Documentation

◆ TSL2591_CH0_COUNTS

#define TSL2591_CH0_COUNTS   264.1f

Counts per uW/cm2 for CH0 (Full spectrum)

◆ TSL2591_CH1_COUNTS

#define TSL2591_CH1_COUNTS   34.9f

Counts per uW/cm2 for CH1 (IR)

◆ TSL2591_CHIP_ID

#define TSL2591_CHIP_ID   0x50U

TSL2591 Chip ID to check against.

◆ TSL2591_DEVICE_FACTOR

#define TSL2591_DEVICE_FACTOR   53U

TSL2591 Device factor.

Function Documentation

◆ TSL2591_Get_Lux()

uint32_t TSL2591_Get_Lux ( const TSL2591_t *const pCpnt)
inline

Get current Illuminance (in lux)

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

◆ TSL2591_handler()

FctERR TSL2591_handler ( TSL2591_t *const pCpnt)

Handler for TSL2591 peripheral.

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

◆ TSL2591_handler_all()

FctERR TSL2591_handler_all ( void )

Handler for all TSL2591 peripherals.

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

◆ TSL2591_handler_it()

FctERR TSL2591_handler_it ( TSL2591_t *const pCpnt)

Handler for TSL2591 peripheral GPIO interrupt.

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

◆ TSL2591_handler_it_all()

FctERR TSL2591_handler_it_all ( void )

Handler for all TSL2591 peripherals GPIO interrupt.

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

◆ TSL2591_Init_Sequence()

FctERR TSL2591_Init_Sequence ( TSL2591_t *const pCpnt)

Initialization Sequence for TSL2591 peripheral.

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

◆ TSL2591_Set_CPL()

void TSL2591_Set_CPL ( TSL2591_t *const pCpnt)

Set proper CPL value (Counts per kiloLux)

Note
Should be called after Configuration change of Integration time or Gain
Parameters
[in]pCpnt- Pointer to TSL2591 component
Here is the caller graph for this function:

Variable Documentation

◆ TSL2591

TSL2591_t TSL2591[I2C_TSL2591_NB]
extern

TSL2591 User structure.