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

TSL2591 Driver procedures. More...

#include "TSL2591.h"
Include dependency graph for TSL2591_proc.c:

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)
 
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] = { 0 }
 TSL2591 User structure.
 
const uint16_t TSL2591_gain_tab [4] = { 1U, 25U, 400U, 9200U }
 
const uint16_t TSL2591_integ_tab [6] = { 100U, 200U, 300U, 400U, 500U, 600U }
 

Detailed Description

TSL2591 Driver procedures.

Author
SMFSW

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

Function Documentation

◆ 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] = { 0 }

TSL2591 User structure.

◆ TSL2591_gain_tab

const uint16_t TSL2591_gain_tab[4] = { 1U, 25U, 400U, 9200U }

◆ TSL2591_integ_tab

const uint16_t TSL2591_integ_tab[6] = { 100U, 200U, 300U, 400U, 500U, 600U }