![]() |
LibDriver APM2000
|
apm2000 basic driver modules More...
Data Structures | |
| struct | apm2000_handle_s |
| apm2000 handle structure definition More... | |
| struct | apm2000_pm_s |
| apm2000 pm structure definition More... | |
| struct | apm2000_info_s |
| apm2000 information structure definition More... | |
Typedefs | |
| typedef struct apm2000_handle_s | apm2000_handle_t |
| apm2000 handle structure definition | |
| typedef struct apm2000_pm_s | apm2000_pm_t |
| apm2000 pm structure definition | |
| typedef struct apm2000_info_s | apm2000_info_t |
| apm2000 information structure definition | |
Enumerations | |
| enum | apm2000_interface_t { APM2000_INTERFACE_IIC = 0x00 , APM2000_INTERFACE_UART = 0x01 } |
| apm2000 interface enumeration definition More... | |
Functions | |
| uint8_t | apm2000_info (apm2000_info_t *info) |
| get chip information | |
| uint8_t | apm2000_set_interface (apm2000_handle_t *handle, apm2000_interface_t interface) |
| set the chip interface | |
| uint8_t | apm2000_get_interface (apm2000_handle_t *handle, apm2000_interface_t *interface) |
| get the chip interface | |
| uint8_t | apm2000_init (apm2000_handle_t *handle) |
| initialize the chip | |
| uint8_t | apm2000_deinit (apm2000_handle_t *handle) |
| close the chip | |
| uint8_t | apm2000_read (apm2000_handle_t *handle, apm2000_pm_t *pm) |
| read the result | |
| uint8_t | apm2000_read_pm2p5 (apm2000_handle_t *handle, uint16_t *pm2p5_ug_m3) |
| read pm2.5 | |
| uint8_t | apm2000_start_measurement (apm2000_handle_t *handle) |
| start the measurement | |
| uint8_t | apm2000_stop_measurement (apm2000_handle_t *handle) |
| stop the measurement | |
apm2000 basic driver modules
| typedef struct apm2000_handle_s apm2000_handle_t |
apm2000 handle structure definition
| typedef struct apm2000_info_s apm2000_info_t |
apm2000 information structure definition
| typedef struct apm2000_pm_s apm2000_pm_t |
apm2000 pm structure definition
| enum apm2000_interface_t |
apm2000 interface enumeration definition
| Enumerator | |
|---|---|
| APM2000_INTERFACE_IIC | iic interface |
| APM2000_INTERFACE_UART | uart interface |
Definition at line 62 of file driver_apm2000.h.
| uint8_t apm2000_deinit | ( | apm2000_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an apm2000 handle structure |
Definition at line 678 of file driver_apm2000.c.
| uint8_t apm2000_get_interface | ( | apm2000_handle_t * | handle, |
| apm2000_interface_t * | interface ) |
get the chip interface
| [in] | *handle | pointer to an apm2000 handle structure |
| [out] | *interface | pointer to a chip interface buffer |
Definition at line 301 of file driver_apm2000.c.
| uint8_t apm2000_info | ( | apm2000_info_t * | info | ) |
get chip information
| [out] | *info | pointer to an apm2000 info structure |
Definition at line 830 of file driver_apm2000.c.
| uint8_t apm2000_init | ( | apm2000_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an apm2000 handle structure |
Definition at line 574 of file driver_apm2000.c.
| uint8_t apm2000_read | ( | apm2000_handle_t * | handle, |
| apm2000_pm_t * | pm ) |
read the result
| [in] | *handle | pointer to an apm2000 handle structure |
| [out] | *pm | pointer to an apm2000 pm structure |
Definition at line 417 of file driver_apm2000.c.
| uint8_t apm2000_read_pm2p5 | ( | apm2000_handle_t * | handle, |
| uint16_t * | pm2p5_ug_m3 ) |
read pm2.5
| [in] | *handle | pointer to an apm2000 handle structure |
| [out] | *pm2p5_ug_m3 | pointer to a data buffer |
Definition at line 511 of file driver_apm2000.c.
| uint8_t apm2000_set_interface | ( | apm2000_handle_t * | handle, |
| apm2000_interface_t | interface ) |
set the chip interface
| [in] | *handle | pointer to an apm2000 handle structure |
| [in] | interface | chip interface |
Definition at line 280 of file driver_apm2000.c.
| uint8_t apm2000_start_measurement | ( | apm2000_handle_t * | handle | ) |
start the measurement
| [in] | *handle | pointer to an apm2000 handle structure |
Definition at line 324 of file driver_apm2000.c.
| uint8_t apm2000_stop_measurement | ( | apm2000_handle_t * | handle | ) |
stop the measurement
| [in] | *handle | pointer to an apm2000 handle structure |
Definition at line 372 of file driver_apm2000.c.