![]() |
LibDriver MAX44009
|
max44009 basic driver modules More...
Data Structures | |
| struct | max44009_handle_s |
| max44009 handle structure definition More... | |
| struct | max44009_info_s |
| max44009 information structure definition More... | |
Typedefs | |
| typedef struct max44009_handle_s | max44009_handle_t |
| max44009 handle structure definition | |
| typedef struct max44009_info_s | max44009_info_t |
| max44009 information structure definition | |
Enumerations | |
| enum | max44009_address_t { MAX44009_ADDRESS_0 = 0x94 , MAX44009_ADDRESS_1 = 0x96 } |
| max44009 address enumeration definition More... | |
| enum | max44009_bool_t { MAX44009_BOOL_FALSE = 0x00 , MAX44009_BOOL_TRUE = 0x01 } |
| max44009 bool enumeration definition More... | |
| enum | max44009_integration_time_t { MAX44009_INTEGRATION_TIME_800MS = 0x00 , MAX44009_INTEGRATION_TIME_400MS = 0x01 , MAX44009_INTEGRATION_TIME_200MS = 0x02 , MAX44009_INTEGRATION_TIME_100MS = 0x03 , MAX44009_INTEGRATION_TIME_50MS = 0x04 , MAX44009_INTEGRATION_TIME_25MS = 0x05 , MAX44009_INTEGRATION_TIME_12P5MS = 0x06 , MAX44009_INTEGRATION_TIME_6P25MS = 0x07 } |
| max44009 integration time enumeration definition More... | |
Functions | |
| uint8_t | max44009_info (max44009_info_t *info) |
| get chip's information | |
| uint8_t | max44009_set_addr_pin (max44009_handle_t *handle, max44009_address_t addr_pin) |
| set the address pin | |
| uint8_t | max44009_get_addr_pin (max44009_handle_t *handle, max44009_address_t *addr_pin) |
| get the address pin | |
| uint8_t | max44009_init (max44009_handle_t *handle) |
| initialize the chip | |
| uint8_t | max44009_deinit (max44009_handle_t *handle) |
| close the chip | |
| uint8_t | max44009_read (max44009_handle_t *handle, uint16_t *raw, float *lux) |
| read data | |
| uint8_t | max44009_get_interrupt_status (max44009_handle_t *handle, max44009_bool_t *enable) |
| get interrupt status | |
| uint8_t | max44009_set_interrupt (max44009_handle_t *handle, max44009_bool_t enable) |
| enable or disable interrupt | |
| uint8_t | max44009_get_interrupt (max44009_handle_t *handle, max44009_bool_t *enable) |
| get interrupt status | |
| uint8_t | max44009_set_continuous_mode (max44009_handle_t *handle, max44009_bool_t enable) |
| enable or disable continuous mode | |
| uint8_t | max44009_get_continuous_mode (max44009_handle_t *handle, max44009_bool_t *enable) |
| get continuous mode stauts | |
| uint8_t | max44009_set_auto_range (max44009_handle_t *handle, max44009_bool_t enable) |
| enable or disable auto range | |
| uint8_t | max44009_get_auto_range (max44009_handle_t *handle, max44009_bool_t *enable) |
| get auto range | |
| uint8_t | max44009_set_current_div_8 (max44009_handle_t *handle, max44009_bool_t enable) |
| enable or disable current div 8 | |
| uint8_t | max44009_get_current_div_8 (max44009_handle_t *handle, max44009_bool_t *enable) |
| get current div 8 | |
| uint8_t | max44009_set_integration_time (max44009_handle_t *handle, max44009_integration_time_t t) |
| set integration time | |
| uint8_t | max44009_get_integration_time (max44009_handle_t *handle, max44009_integration_time_t *t) |
| get integration time | |
| uint8_t | max44009_set_interrupt_high_threshold (max44009_handle_t *handle, uint8_t threshold) |
| set interrupt high threshold | |
| uint8_t | max44009_get_interrupt_high_threshold (max44009_handle_t *handle, uint8_t *threshold) |
| get interrupt high threshold | |
| uint8_t | max44009_set_interrupt_low_threshold (max44009_handle_t *handle, uint8_t threshold) |
| set interrupt low threshold | |
| uint8_t | max44009_get_interrupt_low_threshold (max44009_handle_t *handle, uint8_t *threshold) |
| get interrupt low threshold | |
| uint8_t | max44009_set_threshold_timer (max44009_handle_t *handle, uint8_t t) |
| set threshold timer | |
| uint8_t | max44009_get_threshold_timer (max44009_handle_t *handle, uint8_t *t) |
| get threshold timer | |
| uint8_t | max44009_threshold_convert_to_register (max44009_handle_t *handle, float lux, uint8_t *reg) |
| convert the threshold to the register raw data | |
| uint8_t | max44009_threshold_convert_to_data (max44009_handle_t *handle, uint8_t reg, float *lux) |
| convert the register raw data to the threshold | |
| uint8_t | max44009_timer_convert_to_register (max44009_handle_t *handle, float ms, uint8_t *reg) |
| convert the timer to the register raw data | |
| uint8_t | max44009_timer_convert_to_data (max44009_handle_t *handle, uint8_t reg, float *ms) |
| convert the register raw data to timer | |
max44009 basic driver modules
| typedef struct max44009_handle_s max44009_handle_t |
max44009 handle structure definition
| typedef struct max44009_info_s max44009_info_t |
max44009 information structure definition
| enum max44009_address_t |
max44009 address enumeration definition
| Enumerator | |
|---|---|
| MAX44009_ADDRESS_0 | addr low |
| MAX44009_ADDRESS_1 | addr high |
Definition at line 62 of file driver_max44009.h.
| enum max44009_bool_t |
max44009 bool enumeration definition
| Enumerator | |
|---|---|
| MAX44009_BOOL_FALSE | false |
| MAX44009_BOOL_TRUE | true |
Definition at line 71 of file driver_max44009.h.
max44009 integration time enumeration definition
Definition at line 80 of file driver_max44009.h.
| uint8_t max44009_deinit | ( | max44009_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a max44009 handle structure |
Definition at line 1026 of file driver_max44009.c.
| uint8_t max44009_get_addr_pin | ( | max44009_handle_t * | handle, |
| max44009_address_t * | addr_pin ) |
get the address pin
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *addr_pin | pointer to a chip address pins buffer |
Definition at line 136 of file driver_max44009.c.
| uint8_t max44009_get_auto_range | ( | max44009_handle_t * | handle, |
| max44009_bool_t * | enable ) |
get auto range
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 405 of file driver_max44009.c.
| uint8_t max44009_get_continuous_mode | ( | max44009_handle_t * | handle, |
| max44009_bool_t * | enable ) |
get continuous mode stauts
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 323 of file driver_max44009.c.
| uint8_t max44009_get_current_div_8 | ( | max44009_handle_t * | handle, |
| max44009_bool_t * | enable ) |
get current div 8
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 487 of file driver_max44009.c.
| uint8_t max44009_get_integration_time | ( | max44009_handle_t * | handle, |
| max44009_integration_time_t * | t ) |
get integration time
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *t | pointer to an integration time buffer |
Definition at line 569 of file driver_max44009.c.
| uint8_t max44009_get_interrupt | ( | max44009_handle_t * | handle, |
| max44009_bool_t * | enable ) |
get interrupt status
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 241 of file driver_max44009.c.
| uint8_t max44009_get_interrupt_high_threshold | ( | max44009_handle_t * | handle, |
| uint8_t * | threshold ) |
get interrupt high threshold
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *threshold | pointer to a threshold buffer |
Definition at line 643 of file driver_max44009.c.
| uint8_t max44009_get_interrupt_low_threshold | ( | max44009_handle_t * | handle, |
| uint8_t * | threshold ) |
get interrupt low threshold
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *threshold | pointer to a threshold buffer |
Definition at line 717 of file driver_max44009.c.
| uint8_t max44009_get_interrupt_status | ( | max44009_handle_t * | handle, |
| max44009_bool_t * | enable ) |
get interrupt status
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 159 of file driver_max44009.c.
| uint8_t max44009_get_threshold_timer | ( | max44009_handle_t * | handle, |
| uint8_t * | t ) |
get threshold timer
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *t | pointer to a timer time buffer |
Definition at line 791 of file driver_max44009.c.
| uint8_t max44009_info | ( | max44009_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a max44009 info structure |
Definition at line 1186 of file driver_max44009.c.
| uint8_t max44009_init | ( | max44009_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a max44009 handle structure |
Definition at line 962 of file driver_max44009.c.
| uint8_t max44009_read | ( | max44009_handle_t * | handle, |
| uint16_t * | raw, | ||
| float * | lux ) |
read data
| [in] | *handle | pointer to a max44009 handle structure |
| [out] | *raw | pointer to a raw lux buffer |
| [out] | *lux | pointer to a converted lux buffer |
Definition at line 1079 of file driver_max44009.c.
| uint8_t max44009_set_addr_pin | ( | max44009_handle_t * | handle, |
| max44009_address_t | addr_pin ) |
set the address pin
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | addr_pin | chip address pins |
Definition at line 115 of file driver_max44009.c.
| uint8_t max44009_set_auto_range | ( | max44009_handle_t * | handle, |
| max44009_bool_t | enable ) |
enable or disable auto range
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | enable | bool value |
Definition at line 360 of file driver_max44009.c.
| uint8_t max44009_set_continuous_mode | ( | max44009_handle_t * | handle, |
| max44009_bool_t | enable ) |
enable or disable continuous mode
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | enable | bool value |
Definition at line 278 of file driver_max44009.c.
| uint8_t max44009_set_current_div_8 | ( | max44009_handle_t * | handle, |
| max44009_bool_t | enable ) |
enable or disable current div 8
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | enable | bool value |
Definition at line 442 of file driver_max44009.c.
| uint8_t max44009_set_integration_time | ( | max44009_handle_t * | handle, |
| max44009_integration_time_t | t ) |
set integration time
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | t | integration time |
Definition at line 524 of file driver_max44009.c.
| uint8_t max44009_set_interrupt | ( | max44009_handle_t * | handle, |
| max44009_bool_t | enable ) |
enable or disable interrupt
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | enable | bool value |
Definition at line 196 of file driver_max44009.c.
| uint8_t max44009_set_interrupt_high_threshold | ( | max44009_handle_t * | handle, |
| uint8_t | threshold ) |
set interrupt high threshold
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | threshold | high threshold |
Definition at line 606 of file driver_max44009.c.
| uint8_t max44009_set_interrupt_low_threshold | ( | max44009_handle_t * | handle, |
| uint8_t | threshold ) |
set interrupt low threshold
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | threshold | low threshold |
Definition at line 680 of file driver_max44009.c.
| uint8_t max44009_set_threshold_timer | ( | max44009_handle_t * | handle, |
| uint8_t | t ) |
set threshold timer
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | t | timer time |
Definition at line 754 of file driver_max44009.c.
| uint8_t max44009_threshold_convert_to_data | ( | max44009_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | lux ) |
convert the register raw data to the threshold
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | reg | register raw data |
| [out] | *lux | pointer to a lux buffer |
Definition at line 877 of file driver_max44009.c.
| uint8_t max44009_threshold_convert_to_register | ( | max44009_handle_t * | handle, |
| float | lux, | ||
| uint8_t * | reg ) |
convert the threshold to the register raw data
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | lux | input lux |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 828 of file driver_max44009.c.
| uint8_t max44009_timer_convert_to_data | ( | max44009_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | ms ) |
convert the register raw data to timer
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | reg | register raw data |
| [out] | *ms | pointer to a time buffer |
Definition at line 936 of file driver_max44009.c.
| uint8_t max44009_timer_convert_to_register | ( | max44009_handle_t * | handle, |
| float | ms, | ||
| uint8_t * | reg ) |
convert the timer to the register raw data
| [in] | *handle | pointer to a max44009 handle structure |
| [in] | ms | input time in ms |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 909 of file driver_max44009.c.