![]() |
LibDriver OPT300X
|
opt300x example driver modules More...
Functions | |
| uint8_t | opt300x_basic_init (opt300x_t type, opt300x_address_t addr_pin) |
| basic example init | |
| uint8_t | opt300x_basic_deinit (void) |
| basic example deinit | |
| uint8_t | opt300x_basic_read (float *lux) |
| basic example read | |
| uint8_t | opt3002_basic_read (float *nw_cm2) |
| basic example read | |
| uint8_t | opt300x_interrupt_irq_handler (void) |
| interrupt irq | |
| 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_deinit (void) |
| interrupt example deinit | |
| uint8_t | opt300x_interrupt_read (float *lux) |
| interrupt example read | |
| uint8_t | opt3002_interrupt_read (float *nw_cm2) |
| interrupt example read | |
| uint8_t | opt300x_shot_init (opt300x_t type, opt300x_address_t addr_pin) |
| shot example init | |
| uint8_t | opt300x_shot_deinit (void) |
| shot example deinit | |
| uint8_t | opt300x_shot_read (float *lux) |
| shot example read | |
| uint8_t | opt3002_shot_read (float *nw_cm2) |
| shot example read | |
opt300x example driver modules
| #define OPT3002_BASIC_DEFAULT_RANGE OPT3002_RANGE_AUTO |
opt300x basic example default definition
auto range
Definition at line 56 of file driver_opt300x_basic.h.
| #define OPT3002_INTERRUPT_DEFAULT_RANGE OPT3002_RANGE_AUTO |
auto range
Definition at line 56 of file driver_opt300x_interrupt.h.
| #define OPT3002_SHOT_DEFAULT_RANGE OPT3002_RANGE_AUTO |
opt300x shot example default definition
auto range
Definition at line 54 of file driver_opt300x_shot.h.
| #define OPT3005_BASIC_DEFAULT_RANGE OPT3005_RANGE_AUTO |
auto range
Definition at line 57 of file driver_opt300x_basic.h.
| #define OPT3005_INTERRUPT_DEFAULT_RANGE OPT3005_RANGE_AUTO |
auto range
Definition at line 57 of file driver_opt300x_interrupt.h.
| #define OPT3005_SHOT_DEFAULT_RANGE OPT3005_RANGE_AUTO |
auto range
Definition at line 55 of file driver_opt300x_shot.h.
| #define OPT300X_BASIC_DEFAULT_CONVERSION_TIME OPT300X_CONVERSION_TIME_800_MS |
800ms
Definition at line 59 of file driver_opt300x_basic.h.
| #define OPT300X_BASIC_DEFAULT_FAULT_COUNT OPT300X_FAULT_COUNT_ONE |
fault count one
Definition at line 61 of file driver_opt300x_basic.h.
| #define OPT300X_BASIC_DEFAULT_MASK_EXPONENT OPT300X_BOOL_FALSE |
disable mask exponent
Definition at line 60 of file driver_opt300x_basic.h.
| #define OPT300X_BASIC_DEFAULT_RANGE OPT300X_RANGE_AUTO |
auto range
Definition at line 58 of file driver_opt300x_basic.h.
| #define OPT300X_INTERRUPT_DEFAULT_CONVERSION_TIME OPT300X_CONVERSION_TIME_800_MS |
800ms
Definition at line 59 of file driver_opt300x_interrupt.h.
| #define OPT300X_INTERRUPT_DEFAULT_FAULT_COUNT OPT300X_FAULT_COUNT_ONE |
fault count one
Definition at line 61 of file driver_opt300x_interrupt.h.
| #define OPT300X_INTERRUPT_DEFAULT_INTERRUPT_LATCH OPT300X_BOOL_TRUE |
opt300x interrupt example default definition
enable interrupt latch
Definition at line 54 of file driver_opt300x_interrupt.h.
| #define OPT300X_INTERRUPT_DEFAULT_INTERRUPT_POLARITY OPT300X_INTERRUPT_POLARITY_LOW |
interrupt pin polarity low
Definition at line 55 of file driver_opt300x_interrupt.h.
| #define OPT300X_INTERRUPT_DEFAULT_MASK_EXPONENT OPT300X_BOOL_FALSE |
disable mask exponent
Definition at line 60 of file driver_opt300x_interrupt.h.
| #define OPT300X_INTERRUPT_DEFAULT_RANGE OPT300X_RANGE_AUTO |
auto range
Definition at line 58 of file driver_opt300x_interrupt.h.
| #define OPT300X_SHOT_DEFAULT_CONVERSION_TIME OPT300X_CONVERSION_TIME_800_MS |
800ms
Definition at line 57 of file driver_opt300x_shot.h.
| #define OPT300X_SHOT_DEFAULT_FAULT_COUNT OPT300X_FAULT_COUNT_ONE |
fault count one
Definition at line 59 of file driver_opt300x_shot.h.
| #define OPT300X_SHOT_DEFAULT_MASK_EXPONENT OPT300X_BOOL_FALSE |
disable mask exponent
Definition at line 58 of file driver_opt300x_shot.h.
| #define OPT300X_SHOT_DEFAULT_RANGE OPT300X_RANGE_AUTO |
auto range
Definition at line 56 of file driver_opt300x_shot.h.
| uint8_t opt3002_basic_read | ( | float * | nw_cm2 | ) |
basic example read
| [out] | *nw_cm2 | pointer to a converted data buffer |
Definition at line 198 of file driver_opt300x_basic.c.
| uint8_t opt3002_interrupt_read | ( | float * | nw_cm2 | ) |
interrupt example read
| [out] | *nw_cm2 | pointer to a converted data buffer |
Definition at line 326 of file driver_opt300x_interrupt.c.
| uint8_t opt3002_shot_read | ( | float * | nw_cm2 | ) |
shot example read
| [out] | *nw_cm2 | pointer to a converted data buffer |
Definition at line 188 of file driver_opt300x_shot.c.
| uint8_t opt300x_basic_deinit | ( | void | ) |
basic example deinit
Definition at line 218 of file driver_opt300x_basic.c.
| uint8_t opt300x_basic_init | ( | opt300x_t | type, |
| opt300x_address_t | addr_pin ) |
basic example init
| [in] | type | chip type |
| [in] | addr_pin | iic device address |
Definition at line 50 of file driver_opt300x_basic.c.
| uint8_t opt300x_basic_read | ( | float * | lux | ) |
basic example read
| [out] | *lux | pointer to a lux buffer |
Definition at line 177 of file driver_opt300x_basic.c.
| uint8_t opt300x_interrupt_deinit | ( | void | ) |
interrupt example deinit
Definition at line 346 of file driver_opt300x_interrupt.c.
| 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
| [in] | type | chip type |
| [in] | addr_pin | iic device address |
| [in] | low_threshold | low threshold in lux or in nw/cm2 |
| [in] | high_threshold | high threshold in lux or in nw/cm2 |
| [in] | *callback | pointer to a callback function address |
Definition at line 70 of file driver_opt300x_interrupt.c.
| uint8_t opt300x_interrupt_irq_handler | ( | void | ) |
interrupt irq
Definition at line 48 of file driver_opt300x_interrupt.c.
| uint8_t opt300x_interrupt_read | ( | float * | lux | ) |
interrupt example read
| [out] | *lux | pointer to a lux buffer |
Definition at line 305 of file driver_opt300x_interrupt.c.
| uint8_t opt300x_shot_deinit | ( | void | ) |
shot example deinit
Definition at line 208 of file driver_opt300x_shot.c.
| uint8_t opt300x_shot_init | ( | opt300x_t | type, |
| opt300x_address_t | addr_pin ) |
shot example init
| [in] | type | chip type |
| [in] | addr_pin | iic device address |
Definition at line 50 of file driver_opt300x_shot.c.
| uint8_t opt300x_shot_read | ( | float * | lux | ) |
shot example read
| [out] | *lux | pointer to a lux buffer |
Definition at line 167 of file driver_opt300x_shot.c.