LibDriver TSL2561
Loading...
Searching...
No Matches
tsl2561 interrupt driver function

tsl2561 interrupt driver modules More...

Collaboration diagram for tsl2561 interrupt driver function:

Enumerations

enum  tsl2561_interrupt_mode_t {
  TSL2561_INTERRUPT_MODE_EVERY_ADC_CYCLE = 0x00 , TSL2561_INTERRUPT_MODE_ANY_VALUE_OUT_OF_THRESHOLD_RANGE = 0x01 , TSL2561_INTERRUPT_MODE_2_INTEGRATION_TIME_OUT_OF_RANGE = 0x02 , TSL2561_INTERRUPT_MODE_3_INTEGRATION_TIME_OUT_OF_RANGE = 0x03 ,
  TSL2561_INTERRUPT_MODE_4_INTEGRATION_TIME_OUT_OF_RANGE = 0x04 , TSL2561_INTERRUPT_MODE_5_INTEGRATION_TIME_OUT_OF_RANGE = 0x05 , TSL2561_INTERRUPT_MODE_6_INTEGRATION_TIME_OUT_OF_RANGE = 0x06 , TSL2561_INTERRUPT_MODE_7_INTEGRATION_TIME_OUT_OF_RANGE = 0x07 ,
  TSL2561_INTERRUPT_MODE_8_INTEGRATION_TIME_OUT_OF_RANGE = 0x08 , TSL2561_INTERRUPT_MODE_9_INTEGRATION_TIME_OUT_OF_RANGE = 0x09 , TSL2561_INTERRUPT_MODE_10_INTEGRATION_TIME_OUT_OF_RANGE = 0x0A , TSL2561_INTERRUPT_MODE_11_INTEGRATION_TIME_OUT_OF_RANGE = 0x0B ,
  TSL2561_INTERRUPT_MODE_12_INTEGRATION_TIME_OUT_OF_RANGE = 0x0C , TSL2561_INTERRUPT_MODE_13_INTEGRATION_TIME_OUT_OF_RANGE = 0x0D , TSL2561_INTERRUPT_MODE_14_INTEGRATION_TIME_OUT_OF_RANGE = 0x0E , TSL2561_INTERRUPT_MODE_15_INTEGRATION_TIME_OUT_OF_RANGE = 0x0F
}
 tsl2561 interrupt mode enumeration definition More...

Functions

uint8_t tsl2561_set_interrupt_mode (tsl2561_handle_t *handle, tsl2561_interrupt_mode_t mode)
 set the interrupt mode
uint8_t tsl2561_get_interrupt_mode (tsl2561_handle_t *handle, tsl2561_interrupt_mode_t *mode)
 get the interrupt mode
uint8_t tsl2561_set_interrupt (tsl2561_handle_t *handle, tsl2561_bool_t enable)
 enable or disable the chip interrupt
uint8_t tsl2561_get_interrupt (tsl2561_handle_t *handle, tsl2561_bool_t *enable)
 get the chip interrupt
uint8_t tsl2561_set_interrupt_high_threshold (tsl2561_handle_t *handle, uint16_t ch0_raw)
 set the interrupt high threshold
uint8_t tsl2561_get_interrupt_high_threshold (tsl2561_handle_t *handle, uint16_t *ch0_raw)
 get the interrupt high threshold
uint8_t tsl2561_set_interrupt_low_threshold (tsl2561_handle_t *handle, uint16_t ch0_raw)
 set the interrupt low threshold
uint8_t tsl2561_get_interrupt_low_threshold (tsl2561_handle_t *handle, uint16_t *ch0_raw)
 get the interrupt low threshold

Detailed Description

tsl2561 interrupt driver modules

Enumeration Type Documentation

◆ tsl2561_interrupt_mode_t

tsl2561 interrupt mode enumeration definition

Enumerator
TSL2561_INTERRUPT_MODE_EVERY_ADC_CYCLE 

every adc cycle interrupt

TSL2561_INTERRUPT_MODE_ANY_VALUE_OUT_OF_THRESHOLD_RANGE 

any value out of threshold range interrupt

TSL2561_INTERRUPT_MODE_2_INTEGRATION_TIME_OUT_OF_RANGE 

2 integration time out of range

TSL2561_INTERRUPT_MODE_3_INTEGRATION_TIME_OUT_OF_RANGE 

3 integration time out of range

TSL2561_INTERRUPT_MODE_4_INTEGRATION_TIME_OUT_OF_RANGE 

4 integration time out of range

TSL2561_INTERRUPT_MODE_5_INTEGRATION_TIME_OUT_OF_RANGE 

5 integration time out of range

TSL2561_INTERRUPT_MODE_6_INTEGRATION_TIME_OUT_OF_RANGE 

6 integration time out of range

TSL2561_INTERRUPT_MODE_7_INTEGRATION_TIME_OUT_OF_RANGE 

7 integration time out of range

TSL2561_INTERRUPT_MODE_8_INTEGRATION_TIME_OUT_OF_RANGE 

8 integration time out of range

TSL2561_INTERRUPT_MODE_9_INTEGRATION_TIME_OUT_OF_RANGE 

9 integration time out of range

TSL2561_INTERRUPT_MODE_10_INTEGRATION_TIME_OUT_OF_RANGE 

10 integration time out of range

TSL2561_INTERRUPT_MODE_11_INTEGRATION_TIME_OUT_OF_RANGE 

11 integration time out of range

TSL2561_INTERRUPT_MODE_12_INTEGRATION_TIME_OUT_OF_RANGE 

12 integration time out of range

TSL2561_INTERRUPT_MODE_13_INTEGRATION_TIME_OUT_OF_RANGE 

13 integration time out of range

TSL2561_INTERRUPT_MODE_14_INTEGRATION_TIME_OUT_OF_RANGE 

14 integration time out of range

TSL2561_INTERRUPT_MODE_15_INTEGRATION_TIME_OUT_OF_RANGE 

15 integration time out of range

Definition at line 110 of file driver_tsl2561.h.

Function Documentation

◆ tsl2561_get_interrupt()

uint8_t tsl2561_get_interrupt ( tsl2561_handle_t * handle,
tsl2561_bool_t * enable )

get the chip interrupt

Parameters
[in]*handlepointer to a tsl2561 handle structure
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get interrupt failed
  • 2 handle is NULL
Note
none

Definition at line 717 of file driver_tsl2561.c.

◆ tsl2561_get_interrupt_high_threshold()

uint8_t tsl2561_get_interrupt_high_threshold ( tsl2561_handle_t * handle,
uint16_t * ch0_raw )

get the interrupt high threshold

Parameters
[in]*handlepointer to a tsl2561 handle structure
[out]*ch0_rawpointer to a channel 0 raw data buffer
Returns
status code
  • 0 success
  • 1 get interrupt high threshold failed
  • 2 handle is NULL
Note
none

Definition at line 790 of file driver_tsl2561.c.

◆ tsl2561_get_interrupt_low_threshold()

uint8_t tsl2561_get_interrupt_low_threshold ( tsl2561_handle_t * handle,
uint16_t * ch0_raw )

get the interrupt low threshold

Parameters
[in]*handlepointer to a tsl2561 handle structure
[out]*ch0_rawpointer to a channel 0 raw data buffer
Returns
status code
  • 0 success
  • 1 get interrupt low threshold failed
  • 2 handle is NULL
Note
none

Definition at line 864 of file driver_tsl2561.c.

◆ tsl2561_get_interrupt_mode()

uint8_t tsl2561_get_interrupt_mode ( tsl2561_handle_t * handle,
tsl2561_interrupt_mode_t * mode )

get the interrupt mode

Parameters
[in]*handlepointer to a tsl2561 handle structure
[out]*modepointer to an interrupt mode buffer
Returns
status code
  • 0 success
  • 1 get interrupt mode failed
  • 2 handle is NULL
Note
none

Definition at line 637 of file driver_tsl2561.c.

◆ tsl2561_set_interrupt()

uint8_t tsl2561_set_interrupt ( tsl2561_handle_t * handle,
tsl2561_bool_t enable )

enable or disable the chip interrupt

Parameters
[in]*handlepointer to a tsl2561 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt failed
  • 2 handle is NULL
Note
none

Definition at line 673 of file driver_tsl2561.c.

◆ tsl2561_set_interrupt_high_threshold()

uint8_t tsl2561_set_interrupt_high_threshold ( tsl2561_handle_t * handle,
uint16_t ch0_raw )

set the interrupt high threshold

Parameters
[in]*handlepointer to a tsl2561 handle structure
[in]ch0_rawchannel 0 raw data
Returns
status code
  • 0 success
  • 1 set interrupt high threshold failed
  • 2 handle is NULL
Note
none

Definition at line 753 of file driver_tsl2561.c.

◆ tsl2561_set_interrupt_low_threshold()

uint8_t tsl2561_set_interrupt_low_threshold ( tsl2561_handle_t * handle,
uint16_t ch0_raw )

set the interrupt low threshold

Parameters
[in]*handlepointer to a tsl2561 handle structure
[in]ch0_rawchannel 0 raw data
Returns
status code
  • 0 success
  • 1 set interrupt low threshold failed
  • 2 handle is NULL
Note
none

Definition at line 827 of file driver_tsl2561.c.

◆ tsl2561_set_interrupt_mode()

uint8_t tsl2561_set_interrupt_mode ( tsl2561_handle_t * handle,
tsl2561_interrupt_mode_t mode )

set the interrupt mode

Parameters
[in]*handlepointer to a tsl2561 handle structure
[in]modeinterrupt mode
Returns
status code
  • 0 success
  • 1 set interrupt mode failed
  • 2 handle is NULL
Note
none

Definition at line 593 of file driver_tsl2561.c.