LibDriver UVIS25
Loading...
Searching...
No Matches
uvis25 interrupt driver function

uvis25 interrupt driver modules More...

Collaboration diagram for uvis25 interrupt driver function:

Enumerations

enum  uvis25_interrupt_active_level_t { UVIS25_INTERRUPT_ACTIVE_LEVEL_HIGHER = 0x00 , UVIS25_INTERRUPT_ACTIVE_LEVEL_LOWER = 0x01 }
 uvis25 interrupt active level enumeration definition More...
enum  uvis25_interrupt_pin_type_t { UVIS25_INTERRUPT_PIN_TYPE_PUSH_PULL = 0x00 , UVIS25_INTERRUPT_PIN_TYPE_OPEN_DRAIN = 0x01 }
 uvis25 interrupt pin type enumeration definition More...
enum  uvis25_interrupt_type_t { UVIS25_INTERRUPT_TYPE_DATA_READY = 0x00 , UVIS25_INTERRUPT_TYPE_UV_INDEX_HIGH = 0x01 , UVIS25_INTERRUPT_TYPE_UV_INDEX_LOW = 0x02 , UVIS25_INTERRUPT_TYPE_UV_INDEX_HIGH_LOW = 0x03 }
 uvis25 interrupt type enumeration definition More...
enum  uvis25_interrupt_t { UVIS25_INTERRUPT_ACTIVE = 0x00 , UVIS25_INTERRUPT_HIGHER = 0x01 , UVIS25_INTERRUPT_LOWER = 0x02 }
 uvis25 interrupt status enumeration definition More...

Functions

uint8_t uvis25_set_interrupt_active_level (uvis25_handle_t *handle, uvis25_interrupt_active_level_t level)
 set the interrupt active level
uint8_t uvis25_get_interrupt_active_level (uvis25_handle_t *handle, uvis25_interrupt_active_level_t *level)
 get the interrupt active level
uint8_t uvis25_set_interrupt_pin_type (uvis25_handle_t *handle, uvis25_interrupt_pin_type_t pin_type)
 set the interrupt pin type
uint8_t uvis25_get_interrupt_pin_type (uvis25_handle_t *handle, uvis25_interrupt_pin_type_t *pin_type)
 get the interrupt pin type
uint8_t uvis25_set_interrupt_type (uvis25_handle_t *handle, uvis25_interrupt_type_t type)
 set the interrupt type
uint8_t uvis25_get_interrupt_type (uvis25_handle_t *handle, uvis25_interrupt_type_t *type)
 get the interrupt type
uint8_t uvis25_set_interrupt (uvis25_handle_t *handle, uvis25_bool_t enable)
 enable or disable the chip interrupt
uint8_t uvis25_get_interrupt (uvis25_handle_t *handle, uvis25_bool_t *enable)
 get the chip interrupt status
uint8_t uvis25_set_latch_interrupt (uvis25_handle_t *handle, uvis25_bool_t enable)
 enable or disable latching interrupt
uint8_t uvis25_get_latch_interrupt (uvis25_handle_t *handle, uvis25_bool_t *enable)
 get the latching interrupt status
uint8_t uvis25_set_interrupt_low_threshold (uvis25_handle_t *handle, uvis25_bool_t enable)
 enable or disable the low threshold interrupt
uint8_t uvis25_get_interrupt_low_threshold (uvis25_handle_t *handle, uvis25_bool_t *enable)
 get the low threshold interrupt status
uint8_t uvis25_set_interrupt_high_threshold (uvis25_handle_t *handle, uvis25_bool_t enable)
 enable or disable the high threshold interrupt
uint8_t uvis25_get_interrupt_high_threshold (uvis25_handle_t *handle, uvis25_bool_t *enable)
 get the high threshold interrupt status
uint8_t uvis25_set_threshold (uvis25_handle_t *handle, uint8_t threshold)
 set the interrupt threshold
uint8_t uvis25_get_threshold (uvis25_handle_t *handle, uint8_t *threshold)
 get the interrupt threshold
uint8_t uvis25_threshold_convert_to_register (uvis25_handle_t *handle, float uv, uint8_t *reg)
 convert a uv index to a raw register data
uint8_t uvis25_threshold_convert_to_data (uvis25_handle_t *handle, uint8_t reg, float *uv)
 convert a raw register data to a converted uv index

Detailed Description

uvis25 interrupt driver modules

Enumeration Type Documentation

◆ uvis25_interrupt_active_level_t

uvis25 interrupt active level enumeration definition

Enumerator
UVIS25_INTERRUPT_ACTIVE_LEVEL_HIGHER 

active higher level

UVIS25_INTERRUPT_ACTIVE_LEVEL_LOWER 

active lower level

Definition at line 108 of file driver_uvis25.h.

◆ uvis25_interrupt_pin_type_t

uvis25 interrupt pin type enumeration definition

Enumerator
UVIS25_INTERRUPT_PIN_TYPE_PUSH_PULL 

push pull type

UVIS25_INTERRUPT_PIN_TYPE_OPEN_DRAIN 

open drain type

Definition at line 117 of file driver_uvis25.h.

◆ uvis25_interrupt_t

uvis25 interrupt status enumeration definition

Enumerator
UVIS25_INTERRUPT_ACTIVE 

active

UVIS25_INTERRUPT_HIGHER 

higher

UVIS25_INTERRUPT_LOWER 

lower

Definition at line 137 of file driver_uvis25.h.

◆ uvis25_interrupt_type_t

uvis25 interrupt type enumeration definition

Enumerator
UVIS25_INTERRUPT_TYPE_DATA_READY 

data ready

UVIS25_INTERRUPT_TYPE_UV_INDEX_HIGH 

uv index high

UVIS25_INTERRUPT_TYPE_UV_INDEX_LOW 

uv index low

UVIS25_INTERRUPT_TYPE_UV_INDEX_HIGH_LOW 

uv index high or low

Definition at line 126 of file driver_uvis25.h.

Function Documentation

◆ uvis25_get_interrupt()

uint8_t uvis25_get_interrupt ( uvis25_handle_t * handle,
uvis25_bool_t * enable )

get the chip interrupt status

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

Definition at line 771 of file driver_uvis25.c.

◆ uvis25_get_interrupt_active_level()

uint8_t uvis25_get_interrupt_active_level ( uvis25_handle_t * handle,
uvis25_interrupt_active_level_t * level )

get the interrupt active level

Parameters
[in]*handlepointer to a uvis25 handle structure
[out]*levelpointer to an interrupt active level buffer
Returns
status code
  • 0 success
  • 1 get interrupt active level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 546 of file driver_uvis25.c.

◆ uvis25_get_interrupt_high_threshold()

uint8_t uvis25_get_interrupt_high_threshold ( uvis25_handle_t * handle,
uvis25_bool_t * enable )

get the high threshold interrupt status

Parameters
[in]*handlepointer to a uvis25 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get interrupt high threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 996 of file driver_uvis25.c.

◆ uvis25_get_interrupt_low_threshold()

uint8_t uvis25_get_interrupt_low_threshold ( uvis25_handle_t * handle,
uvis25_bool_t * enable )

get the low threshold interrupt status

Parameters
[in]*handlepointer to a uvis25 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get interrupt low threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 921 of file driver_uvis25.c.

◆ uvis25_get_interrupt_pin_type()

uint8_t uvis25_get_interrupt_pin_type ( uvis25_handle_t * handle,
uvis25_interrupt_pin_type_t * pin_type )

get the interrupt pin type

Parameters
[in]*handlepointer to a uvis25 handle structure
[out]*pin_typepointer to an interrupt pin type buffer
Returns
status code
  • 0 success
  • 1 get interrupt pin type failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 621 of file driver_uvis25.c.

◆ uvis25_get_interrupt_type()

uint8_t uvis25_get_interrupt_type ( uvis25_handle_t * handle,
uvis25_interrupt_type_t * type )

get the interrupt type

Parameters
[in]*handlepointer to a uvis25 handle structure
[out]*typepointer to an interrupt type buffer
Returns
status code
  • 0 success
  • 1 get interrupt type failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 696 of file driver_uvis25.c.

◆ uvis25_get_latch_interrupt()

uint8_t uvis25_get_latch_interrupt ( uvis25_handle_t * handle,
uvis25_bool_t * enable )

get the latching interrupt status

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

Definition at line 846 of file driver_uvis25.c.

◆ uvis25_get_threshold()

uint8_t uvis25_get_threshold ( uvis25_handle_t * handle,
uint8_t * threshold )

get the interrupt threshold

Parameters
[in]*handlepointer to a uvis25 handle structure
[out]*thresholdpointer to an interrupt threshold buffer
Returns
status code
  • 0 success
  • 1 get threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1058 of file driver_uvis25.c.

◆ uvis25_set_interrupt()

uint8_t uvis25_set_interrupt ( uvis25_handle_t * handle,
uvis25_bool_t enable )

enable or disable the chip interrupt

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

Definition at line 733 of file driver_uvis25.c.

◆ uvis25_set_interrupt_active_level()

uint8_t uvis25_set_interrupt_active_level ( uvis25_handle_t * handle,
uvis25_interrupt_active_level_t level )

set the interrupt active level

Parameters
[in]*handlepointer to a uvis25 handle structure
[in]levelinterrupt active level
Returns
status code
  • 0 success
  • 1 set interrupt active level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 508 of file driver_uvis25.c.

◆ uvis25_set_interrupt_high_threshold()

uint8_t uvis25_set_interrupt_high_threshold ( uvis25_handle_t * handle,
uvis25_bool_t enable )

enable or disable the high threshold interrupt

Parameters
[in]*handlepointer to a uvis25 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt high threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 958 of file driver_uvis25.c.

◆ uvis25_set_interrupt_low_threshold()

uint8_t uvis25_set_interrupt_low_threshold ( uvis25_handle_t * handle,
uvis25_bool_t enable )

enable or disable the low threshold interrupt

Parameters
[in]*handlepointer to a uvis25 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt low threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 883 of file driver_uvis25.c.

◆ uvis25_set_interrupt_pin_type()

uint8_t uvis25_set_interrupt_pin_type ( uvis25_handle_t * handle,
uvis25_interrupt_pin_type_t pin_type )

set the interrupt pin type

Parameters
[in]*handlepointer to a uvis25 handle structure
[in]pin_typeinterrupt pin type
Returns
status code
  • 0 success
  • 1 set interrupt pin type failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 583 of file driver_uvis25.c.

◆ uvis25_set_interrupt_type()

uint8_t uvis25_set_interrupt_type ( uvis25_handle_t * handle,
uvis25_interrupt_type_t type )

set the interrupt type

Parameters
[in]*handlepointer to a uvis25 handle structure
[in]typeinterrupt type
Returns
status code
  • 0 success
  • 1 set interrupt type failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 658 of file driver_uvis25.c.

◆ uvis25_set_latch_interrupt()

uint8_t uvis25_set_latch_interrupt ( uvis25_handle_t * handle,
uvis25_bool_t enable )

enable or disable latching interrupt

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

Definition at line 808 of file driver_uvis25.c.

◆ uvis25_set_threshold()

uint8_t uvis25_set_threshold ( uvis25_handle_t * handle,
uint8_t threshold )

set the interrupt threshold

Parameters
[in]*handlepointer to a uvis25 handle structure
[in]thresholdinterrupt threshold
Returns
status code
  • 0 success
  • 1 set threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1033 of file driver_uvis25.c.

◆ uvis25_threshold_convert_to_data()

uint8_t uvis25_threshold_convert_to_data ( uvis25_handle_t * handle,
uint8_t reg,
float * uv )

convert a raw register data to a converted uv index

Parameters
[in]*handlepointer to a uvis25 handle structure
[in]regraw register data
[out]*uvpointer to a uv index buffer
Returns
status code
  • 0 success
  • 1 threshold convert to data failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1167 of file driver_uvis25.c.

◆ uvis25_threshold_convert_to_register()

uint8_t uvis25_threshold_convert_to_register ( uvis25_handle_t * handle,
float uv,
uint8_t * reg )

convert a uv index to a raw register data

Parameters
[in]*handlepointer to a uvis25 handle structure
[in]uvuv index
[out]*regpointer to a raw register data
Returns
status code
  • 0 success
  • 1 threshold convert to register failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1139 of file driver_uvis25.c.