![]() |
LibDriver BA121
|
ba121 basic driver modules More...
Data Structures | |
| struct | ba121_handle_s |
| ba121 handle structure definition More... | |
| struct | ba121_info_s |
| ba121 information structure definition More... | |
Typedefs | |
| typedef struct ba121_handle_s | ba121_handle_t |
| ba121 handle structure definition | |
| typedef struct ba121_info_s | ba121_info_t |
| ba121 information structure definition | |
Enumerations | |
| enum | ba121_status_t { BA121_STATUS_OK = 0x00 , BA121_STATUS_FRAME_ERROR = 0x01 , BA121_STATUS_BUSY = 0x02 , BA121_STATUS_CHECK_ERROR = 0x03 , BA121_STATUS_TEMPERATURE_OUT_OF_RANGE = 0x04 } |
| ba121 status enumeration definition More... | |
Functions | |
| uint8_t | ba121_info (ba121_info_t *info) |
| get chip's information | |
| uint8_t | ba121_init (ba121_handle_t *handle) |
| initialize the chip | |
| uint8_t | ba121_deinit (ba121_handle_t *handle) |
| close the chip | |
| uint8_t | ba121_read (ba121_handle_t *handle, uint16_t *conductivity_raw, uint16_t *conductivity_us_cm, uint16_t *temperature_raw, float *temperature) |
| read the data | |
| uint8_t | ba121_baseline_calibration (ba121_handle_t *handle) |
| baseline calibration | |
| uint8_t | ba121_set_ntc_resistance (ba121_handle_t *handle, uint32_t ohm) |
| set ntc resistance | |
| uint8_t | ba121_set_ntc_b (ba121_handle_t *handle, uint16_t value) |
| set ntc b | |
| uint8_t | ba121_get_last_status (ba121_handle_t *handle, ba121_status_t *status) |
| get last status | |
ba121 basic driver modules
| typedef struct ba121_handle_s ba121_handle_t |
ba121 handle structure definition
| typedef struct ba121_info_s ba121_info_t |
ba121 information structure definition
| enum ba121_status_t |
ba121 status enumeration definition
| Enumerator | |
|---|---|
| BA121_STATUS_OK | ok |
| BA121_STATUS_FRAME_ERROR | frame error |
| BA121_STATUS_BUSY | busy |
| BA121_STATUS_CHECK_ERROR | check error |
| BA121_STATUS_TEMPERATURE_OUT_OF_RANGE | temperature out of range |
Definition at line 62 of file driver_ba121.h.
| uint8_t ba121_baseline_calibration | ( | ba121_handle_t * | handle | ) |
baseline calibration
| [in] | *handle | pointer to a ba121 handle structure |
Definition at line 327 of file driver_ba121.c.
| uint8_t ba121_deinit | ( | ba121_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a ba121 handle structure |
Definition at line 222 of file driver_ba121.c.
| uint8_t ba121_get_last_status | ( | ba121_handle_t * | handle, |
| ba121_status_t * | status ) |
get last status
| [in] | *handle | pointer to a ba121 handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 537 of file driver_ba121.c.
| uint8_t ba121_info | ( | ba121_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a ba121 info structure |
Definition at line 639 of file driver_ba121.c.
| uint8_t ba121_init | ( | ba121_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a ba121 handle structure |
Definition at line 153 of file driver_ba121.c.
| uint8_t ba121_read | ( | ba121_handle_t * | handle, |
| uint16_t * | conductivity_raw, | ||
| uint16_t * | conductivity_us_cm, | ||
| uint16_t * | temperature_raw, | ||
| float * | temperature ) |
read the data
| [in] | *handle | pointer to a ba121 handle structure |
| [out] | *conductivity_raw | pointer to a conductivity raw data buffer |
| [out] | *conductivity_us_cm | pointer to a conductivity uS/cm data buffer |
| [out] | *temperature_raw | pointer to a temperature raw data buffer |
| [out] | *temperature | pointer to a converted temperature data buffer |
Definition at line 259 of file driver_ba121.c.
| uint8_t ba121_set_ntc_b | ( | ba121_handle_t * | handle, |
| uint16_t | value ) |
set ntc b
| [in] | *handle | pointer to a ba121 handle structure |
| [in] | value | ntc value |
Definition at line 469 of file driver_ba121.c.
| uint8_t ba121_set_ntc_resistance | ( | ba121_handle_t * | handle, |
| uint32_t | ohm ) |
set ntc resistance
| [in] | *handle | pointer to a ba121 handle structure |
| [in] | ohm | resistance ohm |
Definition at line 398 of file driver_ba121.c.