ags10 base driver modules
More...
ags10 base driver modules
◆ ags10_handle_t
ags10 handle structure definition
◆ ags10_info_t
ags10 information structure definition
◆ ags10_current_resistance_zero_point_calibration()
| uint8_t ags10_current_resistance_zero_point_calibration |
( |
ags10_handle_t * | handle | ) |
|
zero point calibration using current resistance
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
- Returns
- status code
- 0 success
- 1 current resistance zero point calibration failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 445 of file driver_ags10.c.
◆ ags10_deinit()
close the chip
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
- Returns
- status code
- 0 success
- 1 deinit failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 223 of file driver_ags10.c.
◆ ags10_get_resistance()
| uint8_t ags10_get_resistance |
( |
ags10_handle_t * | handle, |
|
|
uint32_t * | raw, |
|
|
double * | ohm ) |
get resistance
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
| [out] | *raw | pointer to a raw data buffer |
| [out] | *ohm | pointer to a converted data buffer |
- Returns
- status code
- 0 success
- 1 get resistance failed
- 2 handle is NULL
- 3 handle is not initialized
- 4 crc is error
- Note
- none
Definition at line 489 of file driver_ags10.c.
◆ ags10_get_slave_address()
| uint8_t ags10_get_slave_address |
( |
ags10_handle_t * | handle, |
|
|
uint8_t * | addr ) |
get slave address
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
| [out] | *addr | pointer to a slave address buffer |
- Returns
- status code
- 0 success
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 281 of file driver_ags10.c.
◆ ags10_get_version()
| uint8_t ags10_get_version |
( |
ags10_handle_t * | handle, |
|
|
uint8_t * | version ) |
get version
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
| [out] | *version | pointer to a version buffer |
- Returns
- status code
- 0 success
- 1 get resistance failed
- 2 handle is NULL
- 3 handle is not initialized
- 4 crc is error
- Note
- none
Definition at line 537 of file driver_ags10.c.
◆ ags10_info()
get chip's information
- Parameters
-
| [out] | *info | pointer to an ags10 info structure |
- Returns
- status code
- 0 success
- 2 handle is NULL
- Note
- none
Definition at line 685 of file driver_ags10.c.
◆ ags10_init()
initialize the chip
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
- Returns
- status code
- 0 success
- 1 init failed
- 2 handle is NULL
- 3 linked functions is NULL
- Note
- none
Definition at line 154 of file driver_ags10.c.
◆ ags10_modify_slave_address()
| uint8_t ags10_modify_slave_address |
( |
ags10_handle_t * | handle, |
|
|
uint8_t | addr_7bit ) |
modify slave address
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
| [in] | addr_7bit | new slave address |
- Returns
- status code
- 0 success
- 1 modify slave address failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 581 of file driver_ags10.c.
◆ ags10_read_tvoc()
| uint8_t ags10_read_tvoc |
( |
ags10_handle_t * | handle, |
|
|
uint32_t * | raw, |
|
|
uint32_t * | ppb ) |
read tvoc
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
| [out] | *raw | pointer to a raw data buffer |
| [out] | *ppb | pointer to a converted data buffer |
- Returns
- status code
- 0 success
- 1 read tvoc failed
- 2 handle is NULL
- 3 handle is not initialized
- 4 crc is error
- 5 chip is busy
- Note
- none
Definition at line 311 of file driver_ags10.c.
◆ ags10_reset_zero_point_calibration()
reset zero point calibration
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
- Returns
- status code
- 0 success
- 1 reset zero point calibration failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 404 of file driver_ags10.c.
◆ ags10_set_slave_address()
| uint8_t ags10_set_slave_address |
( |
ags10_handle_t * | handle, |
|
|
uint8_t | addr ) |
set slave address
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
| [in] | addr | slave address |
- Returns
- status code
- 0 success
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 255 of file driver_ags10.c.
◆ ags10_zero_point_calibration()
| uint8_t ags10_zero_point_calibration |
( |
ags10_handle_t * | handle, |
|
|
uint16_t | raw ) |
zero point calibration
- Parameters
-
| [in] | *handle | pointer to an ags10 handle structure |
| [in] | raw | raw data |
- Returns
- status code
- 0 success
- 1 zero point calibration failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- raw data unit is 0.1kohm
Definition at line 363 of file driver_ags10.c.