![]() |
LibDriver AM2320
|
am2320 base driver modules More...
Data Structures | |
| struct | am2320_handle_s |
| am2320 handle structure definition More... | |
| struct | am2320_info_s |
| am2320 info structure definition More... | |
Typedefs | |
| typedef struct am2320_handle_s | am2320_handle_t |
| am2320 handle structure definition | |
| typedef struct am2320_info_s | am2320_info_t |
| am2320 info structure definition | |
Enumerations | |
| enum | am2320_interface_t { AM2320_INTERFACE_IIC = 0x00 , AM2320_INTERFACE_GPIO = 0x01 } |
| am2320 interface enumeration definition More... | |
Functions | |
| uint8_t | am2320_info (am2320_info_t *info) |
| get chip's information | |
| uint8_t | am2320_set_interface (am2320_handle_t *handle, am2320_interface_t interface) |
| set the chip interface | |
| uint8_t | am2320_get_interface (am2320_handle_t *handle, am2320_interface_t *interface) |
| get the chip interface | |
| uint8_t | am2320_init (am2320_handle_t *handle) |
| initialize the chip | |
| uint8_t | am2320_deinit (am2320_handle_t *handle) |
| close the chip | |
| uint8_t | am2320_read_temperature_humidity (am2320_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| read the temperature and humidity data | |
| uint8_t | am2320_read_humidity (am2320_handle_t *handle, uint16_t *raw, float *s) |
| read the humidity data | |
| uint8_t | am2320_read_temperature (am2320_handle_t *handle, uint16_t *raw, float *s) |
| read the temperature data | |
| uint8_t | am2320_get_device_type (am2320_handle_t *handle, uint16_t *type) |
| get device type | |
| uint8_t | am2320_get_version (am2320_handle_t *handle, uint8_t *version) |
| get version | |
| uint8_t | am2320_get_status (am2320_handle_t *handle, uint8_t *status) |
| get status | |
| uint8_t | am2320_get_device_id (am2320_handle_t *handle, uint32_t *id) |
| get device id | |
| uint8_t | am2320_set_user_reg1 (am2320_handle_t *handle, uint16_t reg) |
| set user reg1 | |
| uint8_t | am2320_get_user_reg1 (am2320_handle_t *handle, uint16_t *reg) |
| get user reg1 | |
| uint8_t | am2320_set_user_reg2 (am2320_handle_t *handle, uint16_t reg) |
| set user reg2 | |
| uint8_t | am2320_get_user_reg2 (am2320_handle_t *handle, uint16_t *reg) |
| get user reg2 | |
am2320 base driver modules
| typedef struct am2320_handle_s am2320_handle_t |
am2320 handle structure definition
| typedef struct am2320_info_s am2320_info_t |
am2320 info structure definition
| enum am2320_interface_t |
am2320 interface enumeration definition
| Enumerator | |
|---|---|
| AM2320_INTERFACE_IIC | iic interface |
| AM2320_INTERFACE_GPIO | gpio interface |
Definition at line 62 of file driver_am2320.h.
| uint8_t am2320_deinit | ( | am2320_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an am2320 handle structure |
Definition at line 1555 of file driver_am2320.c.
| uint8_t am2320_get_device_id | ( | am2320_handle_t * | handle, |
| uint32_t * | id ) |
get device id
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *id | pointer to an id buffer |
Definition at line 1022 of file driver_am2320.c.
| uint8_t am2320_get_device_type | ( | am2320_handle_t * | handle, |
| uint16_t * | type ) |
get device type
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *type | pointer to a type buffer |
Definition at line 788 of file driver_am2320.c.
| uint8_t am2320_get_interface | ( | am2320_handle_t * | handle, |
| am2320_interface_t * | interface ) |
get the chip interface
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *interface | pointer to a chip interface buffer |
Definition at line 377 of file driver_am2320.c.
| uint8_t am2320_get_status | ( | am2320_handle_t * | handle, |
| uint8_t * | status ) |
get status
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 944 of file driver_am2320.c.
| uint8_t am2320_get_user_reg1 | ( | am2320_handle_t * | handle, |
| uint16_t * | reg ) |
get user reg1
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *reg | pointer to a reg buffer |
Definition at line 1189 of file driver_am2320.c.
| uint8_t am2320_get_user_reg2 | ( | am2320_handle_t * | handle, |
| uint16_t * | reg ) |
get user reg2
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *reg | pointer to a reg buffer |
Definition at line 1355 of file driver_am2320.c.
| uint8_t am2320_get_version | ( | am2320_handle_t * | handle, |
| uint8_t * | version ) |
get version
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *version | pointer to a version buffer |
Definition at line 866 of file driver_am2320.c.
| uint8_t am2320_info | ( | am2320_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an am2320 info structure |
Definition at line 1652 of file driver_am2320.c.
| uint8_t am2320_init | ( | am2320_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an am2320 handle structure |
Definition at line 1432 of file driver_am2320.c.
| uint8_t am2320_read_humidity | ( | am2320_handle_t * | handle, |
| uint16_t * | raw, | ||
| float * | s ) |
read the humidity data
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *raw | pointer to a raw humidity buffer |
| [out] | *s | pointer to a converted humidity buffer |
Definition at line 401 of file driver_am2320.c.
| uint8_t am2320_read_temperature | ( | am2320_handle_t * | handle, |
| uint16_t * | raw, | ||
| float * | s ) |
read the temperature data
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *raw | pointer to a raw temperature buffer |
| [out] | *s | pointer to a converted temperature buffer |
Definition at line 655 of file driver_am2320.c.
| uint8_t am2320_read_temperature_humidity | ( | am2320_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s, | ||
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read the temperature and humidity data
| [in] | *handle | pointer to an am2320 handle structure |
| [out] | *temperature_raw | pointer to a raw temperature buffer |
| [out] | *temperature_s | pointer to a converted temperature buffer |
| [out] | *humidity_raw | pointer to a raw humidity buffer |
| [out] | *humidity_s | pointer to a converted humidity buffer |
Definition at line 518 of file driver_am2320.c.
| uint8_t am2320_set_interface | ( | am2320_handle_t * | handle, |
| am2320_interface_t | interface ) |
set the chip interface
| [in] | *handle | pointer to an am2320 handle structure |
| [in] | interface | chip interface |
Definition at line 356 of file driver_am2320.c.
| uint8_t am2320_set_user_reg1 | ( | am2320_handle_t * | handle, |
| uint16_t | reg ) |
set user reg1
| [in] | *handle | pointer to an am2320 handle structure |
| [in] | reg | register address |
Definition at line 1101 of file driver_am2320.c.
| uint8_t am2320_set_user_reg2 | ( | am2320_handle_t * | handle, |
| uint16_t | reg ) |
set user reg2
| [in] | *handle | pointer to an am2320 handle structure |
| [in] | reg | register address |
Definition at line 1267 of file driver_am2320.c.