LibDriver OPT300X
Loading...
Searching...
No Matches
driver_opt300x_interrupt.h
Go to the documentation of this file.
1
36
37#ifndef DRIVER_OPT300X_INTERRUPT_H
38#define DRIVER_OPT300X_INTERRUPT_H
39
41
42#ifdef __cplusplus
43extern "C"{
44#endif
45
50
54#define OPT300X_INTERRUPT_DEFAULT_INTERRUPT_LATCH OPT300X_BOOL_TRUE
55#define OPT300X_INTERRUPT_DEFAULT_INTERRUPT_POLARITY OPT300X_INTERRUPT_POLARITY_LOW
56#define OPT3002_INTERRUPT_DEFAULT_RANGE OPT3002_RANGE_AUTO
57#define OPT3005_INTERRUPT_DEFAULT_RANGE OPT3005_RANGE_AUTO
58#define OPT300X_INTERRUPT_DEFAULT_RANGE OPT300X_RANGE_AUTO
59#define OPT300X_INTERRUPT_DEFAULT_CONVERSION_TIME OPT300X_CONVERSION_TIME_800_MS
60#define OPT300X_INTERRUPT_DEFAULT_MASK_EXPONENT OPT300X_BOOL_FALSE
61#define OPT300X_INTERRUPT_DEFAULT_FAULT_COUNT OPT300X_FAULT_COUNT_ONE
62
71
85 float low_threshold, float high_threshold,
86 void (*callback)(uint8_t type));
87
95uint8_t opt300x_interrupt_deinit(void);
96
105uint8_t opt300x_interrupt_read(float *lux);
106
115uint8_t opt3002_interrupt_read(float *nw_cm2);
116
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif
driver opt300x interface header file
opt300x_address_t
opt300x address enumeration definition
opt300x_t
opt300x type enumeration definition
uint8_t opt300x_interrupt_irq_handler(void)
interrupt irq
uint8_t opt3002_interrupt_read(float *nw_cm2)
interrupt example read
uint8_t opt300x_interrupt_init(opt300x_t type, opt300x_address_t addr_pin, float low_threshold, float high_threshold, void(*callback)(uint8_t type))
interrupt example init
uint8_t opt300x_interrupt_read(float *lux)
interrupt example read
uint8_t opt300x_interrupt_deinit(void)
interrupt example deinit