![]() |
LibDriver BA234
|
ba234 basic driver modules More...
Data Structures | |
| struct | ba234_data_s |
| ba234 data structure definition More... | |
| struct | ba234_handle_s |
| ba234 handle structure definition More... | |
| struct | ba234_info_s |
| ba234 information structure definition More... | |
Macros | |
| #define | BA234_READ_TIMEOUT 2000 |
| ba234 read timeout definition | |
Typedefs | |
| typedef struct ba234_data_s | ba234_data_t |
| ba234 data structure definition | |
| typedef struct ba234_handle_s | ba234_handle_t |
| ba234 handle structure definition | |
| typedef struct ba234_info_s | ba234_info_t |
| ba234 information structure definition | |
Enumerations | |
| enum | ba234_status_t { BA234_STATUS_OK = 0x00 , BA234_STATUS_FRAME_ERROR = 0x01 , BA234_STATUS_BUSY = 0x02 , BA234_STATUS_CALIBRATION_ERROR = 0x03 } |
| ba234 status enumeration definition More... | |
Functions | |
| uint8_t | ba234_info (ba234_info_t *info) |
| get chip's information | |
| uint8_t | ba234_init (ba234_handle_t *handle) |
| initialize the chip | |
| uint8_t | ba234_deinit (ba234_handle_t *handle) |
| close the chip | |
| uint8_t | ba234_read (ba234_handle_t *handle, ba234_data_t *data) |
| read the data | |
| uint8_t | ba234_baseline_calibration (ba234_handle_t *handle) |
| baseline calibration | |
| uint8_t | ba234_salinity_calibration (ba234_handle_t *handle, uint16_t value) |
| salinity calibration | |
| uint8_t | ba234_get_last_status (ba234_handle_t *handle, ba234_status_t *status) |
| get last status | |
| uint8_t | ba234_salinity_convert_to_register (ba234_handle_t *handle, float percentage, uint16_t *reg) |
| convert the salinity to the register raw data | |
| uint8_t | ba234_salinity_convert_to_data (ba234_handle_t *handle, uint16_t reg, float *percentage) |
| convert the register raw data to the salinity | |
ba234 basic driver modules
| #define BA234_READ_TIMEOUT 2000 |
| typedef struct ba234_data_s ba234_data_t |
ba234 data structure definition
| typedef struct ba234_handle_s ba234_handle_t |
ba234 handle structure definition
| typedef struct ba234_info_s ba234_info_t |
ba234 information structure definition
| enum ba234_status_t |
ba234 status enumeration definition
| Enumerator | |
|---|---|
| BA234_STATUS_OK | ok |
| BA234_STATUS_FRAME_ERROR | frame error |
| BA234_STATUS_BUSY | busy |
| BA234_STATUS_CALIBRATION_ERROR | calibration error |
Definition at line 69 of file driver_ba234.h.
| uint8_t ba234_baseline_calibration | ( | ba234_handle_t * | handle | ) |
baseline calibration
| [in] | *handle | pointer to a ba234 handle structure |
Definition at line 353 of file driver_ba234.c.
| uint8_t ba234_deinit | ( | ba234_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a ba234 handle structure |
Definition at line 257 of file driver_ba234.c.
| uint8_t ba234_get_last_status | ( | ba234_handle_t * | handle, |
| ba234_status_t * | status ) |
get last status
| [in] | *handle | pointer to a ba234 handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 493 of file driver_ba234.c.
| uint8_t ba234_info | ( | ba234_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a ba234 info structure |
Definition at line 649 of file driver_ba234.c.
| uint8_t ba234_init | ( | ba234_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a ba234 handle structure |
Definition at line 188 of file driver_ba234.c.
| uint8_t ba234_read | ( | ba234_handle_t * | handle, |
| ba234_data_t * | data ) |
read the data
| [in] | *handle | pointer to a ba234 handle structure |
| [out] | *data | pointer to a data structure address |
Definition at line 291 of file driver_ba234.c.
| uint8_t ba234_salinity_calibration | ( | ba234_handle_t * | handle, |
| uint16_t | value ) |
salinity calibration
| [in] | *handle | pointer to a ba234 handle structure |
| [in] | value | salinity calibration |
Definition at line 424 of file driver_ba234.c.
| uint8_t ba234_salinity_convert_to_data | ( | ba234_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | percentage ) |
convert the register raw data to the salinity
| [in] | *handle | pointer to a ba234 handle structure |
| [in] | reg | register raw data |
| [out] | *percentage | pointer to a percentage buffer |
Definition at line 546 of file driver_ba234.c.
| uint8_t ba234_salinity_convert_to_register | ( | ba234_handle_t * | handle, |
| float | percentage, | ||
| uint16_t * | reg ) |
convert the salinity to the register raw data
| [in] | *handle | pointer to a ba234 handle structure |
| [in] | percentage | salinity percentage |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 519 of file driver_ba234.c.