![]() |
LibDriver BA111
|
driver ba111 header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | ba111_handle_s |
| ba111 handle structure definition More... | |
| struct | ba111_info_s |
| ba111 information structure definition More... | |
Macros | |
| #define | DRIVER_BA111_LINK_INIT(HANDLE, STRUCTURE) |
| initialize ba111_handle_t structure | |
| #define | DRIVER_BA111_LINK_UART_INIT(HANDLE, FUC) |
| link uart_init function | |
| #define | DRIVER_BA111_LINK_UART_DEINIT(HANDLE, FUC) |
| link uart_deinit function | |
| #define | DRIVER_BA111_LINK_UART_READ(HANDLE, FUC) |
| link uart_read function | |
| #define | DRIVER_BA111_LINK_UART_WRITE(HANDLE, FUC) |
| link uart_write function | |
| #define | DRIVER_BA111_LINK_UART_FLUSH(HANDLE, FUC) |
| link uart_flush function | |
| #define | DRIVER_BA111_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_BA111_LINK_DEBUG_PRINT(HANDLE, FUC) |
| link debug_print function | |
Typedefs | |
| typedef struct ba111_handle_s | ba111_handle_t |
| ba111 handle structure definition | |
| typedef struct ba111_info_s | ba111_info_t |
| ba111 information structure definition | |
Enumerations | |
| enum | ba111_status_t { BA111_STATUS_OK = 0x00 , BA111_STATUS_FRAME_ERROR = 0x01 , BA111_STATUS_BUSY = 0x02 , BA111_STATUS_CHECK_ERROR = 0x03 , BA111_STATUS_TEMPERATURE_OUT_OF_RANGE = 0x04 } |
| ba111 status enumeration definition More... | |
Functions | |
| uint8_t | ba111_info (ba111_info_t *info) |
| get chip's information | |
| uint8_t | ba111_init (ba111_handle_t *handle) |
| initialize the chip | |
| uint8_t | ba111_deinit (ba111_handle_t *handle) |
| close the chip | |
| uint8_t | ba111_read (ba111_handle_t *handle, uint16_t *tds_raw, uint16_t *tds_ppm, uint16_t *temperature_raw, float *temperature) |
| read the data | |
| uint8_t | ba111_baseline_calibration (ba111_handle_t *handle) |
| baseline calibration | |
| uint8_t | ba111_set_ntc_resistance (ba111_handle_t *handle, uint32_t ohm) |
| set ntc resistance | |
| uint8_t | ba111_set_ntc_b (ba111_handle_t *handle, uint16_t value) |
| set ntc b | |
| uint8_t | ba111_get_last_status (ba111_handle_t *handle, ba111_status_t *status) |
| get last status | |
| uint8_t | ba111_set_buffer (ba111_handle_t *handle, uint8_t *buf, uint16_t len) |
| set buffer | |
| uint8_t | ba111_get_buffer (ba111_handle_t *handle, uint8_t *buf, uint16_t len) |
| get buffer | |
driver ba111 header file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Date | Version | Author | Description |
|---|---|---|---|
| 2025/05/15 | 1.0 | Shifeng Li | first upload |
Definition in file driver_ba111.h.