LibDriver UVIS25
Loading...
Searching...
No Matches
driver_uvis25_interrupt.h
Go to the documentation of this file.
1
37
38#ifndef DRIVER_UVIS25_INTERRUPT_H
39#define DRIVER_UVIS25_INTERRUPT_H
40
42
43#ifdef __cplusplus
44extern "C"{
45#endif
46
51
55#define UVIS25_INTERRUPT_DEFAULT_IIC UVIS25_BOOL_TRUE /* enable iic */
56#define UVIS25_INTERRUPT_DEFAULT_SPI_WIRE UVIS25_SPI_WIRE_4 /* 4 wire spi */
57#define UVIS25_INTERRUPT_DEFAULT_BOOT_MODE UVIS25_BOOT_NORMAL_MODE /* normal boot mode */
58#define UVIS25_INTERRUPT_DEFAULT_BLOCK_DATA_UPDATE UVIS25_BOOL_FALSE /* disable block data update */
59#define UVIS25_INTERRUPT_DEFAULT_INTERRUPT_ACTIVE_LEVEL UVIS25_INTERRUPT_ACTIVE_LEVEL_LOWER /* low level */
60#define UVIS25_INTERRUPT_DEFAULT_INTERRUPT_PIN_TYPE UVIS25_INTERRUPT_PIN_TYPE_PUSH_PULL /* set push-pull */
61#define UVIS25_INTERRUPT_DEFAULT_INTERRUPT UVIS25_BOOL_TRUE /* enable interrupt */
62#define UVIS25_INTERRUPT_DEFAULT_LATCH_INTERRUPT UVIS25_BOOL_FALSE /* disable latch interrupt */
63#define UVIS25_INTERRUPT_DEFAULT_HIGH_THRESHOLD_INTERRUPT UVIS25_BOOL_TRUE /* enable high threshold interrupt */
64#define UVIS25_INTERRUPT_DEFAULT_LOW_THRESHOLD_INTERRUPT UVIS25_BOOL_TRUE /* enable low threshold interrupt */
65
74
86uint8_t uvis25_interrupt_init(uvis25_interface_t interface, uvis25_interrupt_type_t mode, float uv_threshold,
87 void (*callback)(uint8_t type));
88
96uint8_t uvis25_interrupt_deinit(void);
97
106uint8_t uvis25_interrupt_read(float *uv);
107
111
112#ifdef __cplusplus
113}
114#endif
115
116#endif
driver uvis25 interface header file
uvis25_interface_t
uvis25 interface enumeration definition
uint8_t uvis25_interrupt_irq_handler(void)
interrupt example irq handler
uint8_t uvis25_interrupt_init(uvis25_interface_t interface, uvis25_interrupt_type_t mode, float uv_threshold, void(*callback)(uint8_t type))
interrupt example init
uint8_t uvis25_interrupt_read(float *uv)
interrupt example read
uint8_t uvis25_interrupt_deinit(void)
basic interrupt deinit
uvis25_interrupt_type_t
uvis25 interrupt type enumeration definition