LibDriver AOX4000
Loading...
Searching...
No Matches
driver_aox4000.h File Reference

driver aox4000 header file More...

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for driver_aox4000.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  aox4000_handle_s
 aox4000 handle structure definition More...
struct  aox4000_info_s
 aox4000 information structure definition More...

Macros

#define AOX4000_UART_DELAY_MS   200
 aox4000 uart delay definition
#define AOX4000_UART_POLL_DELAY_MS   3500
 aox4000 uart poll delay definition
#define DRIVER_AOX4000_LINK_INIT(HANDLE, STRUCTURE)
 initialize aox4000_handle_t structure
#define DRIVER_AOX4000_LINK_UART_INIT(HANDLE, FUC)
 link uart_init function
#define DRIVER_AOX4000_LINK_UART_DEINIT(HANDLE, FUC)
 link uart_deinit function
#define DRIVER_AOX4000_LINK_UART_READ(HANDLE, FUC)
 link uart_read function
#define DRIVER_AOX4000_LINK_UART_WRITE(HANDLE, FUC)
 link uart_write function
#define DRIVER_AOX4000_LINK_UART_FLUSH(HANDLE, FUC)
 link uart_flush function
#define DRIVER_AOX4000_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_AOX4000_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function

Typedefs

typedef struct aox4000_handle_s aox4000_handle_t
 aox4000 handle structure definition
typedef struct aox4000_info_s aox4000_info_t
 aox4000 information structure definition

Enumerations

enum  aox4000_status_t {
  AOX4000_STATUS_OK = 0x00 , AOX4000_STATUS_OVERRUN = 0x01 , AOX4000_STATUS_INVALID_COMMAND = 0x02 , AOX4000_STATUS_INVALID_FRAME = 0x03 ,
  AOX4000_STATUS_INVALID_PARAM = 0x04 , AOX4000_STATUS_UNKNOWN = 0x05
}
 aox4000 status enumeration definition More...
enum  aox4000_mode_t { AOX4000_MODE_AUTO = 0x00 , AOX4000_MODE_REQUEST = 0x01 }
 aox4000 mode enumeration definition More...

Functions

uint8_t aox4000_info (aox4000_info_t *info)
 get chip's information
uint8_t aox4000_init (aox4000_handle_t *handle)
 initialize the chip
uint8_t aox4000_deinit (aox4000_handle_t *handle)
 close the chip
uint8_t aox4000_read (aox4000_handle_t *handle, float *oxygen_ppo2_mbar, float *oxygen_density_percentage, float *temperature_degree, float *pressure_mbar)
 read data
uint8_t aox4000_read_oxygen_ppo2 (aox4000_handle_t *handle, float *mbar)
 read oxygen ppo2
uint8_t aox4000_read_oxygen_density (aox4000_handle_t *handle, float *percentage)
 read oxygen density
uint8_t aox4000_read_temperature (aox4000_handle_t *handle, float *degree)
 read temperature
uint8_t aox4000_read_pressure (aox4000_handle_t *handle, float *mbar)
 read pressure
uint8_t aox4000_set_mode (aox4000_handle_t *handle, aox4000_mode_t mode)
 set mode
uint8_t aox4000_get_mode (aox4000_handle_t *handle, aox4000_mode_t *mode)
 get mode
uint8_t aox4000_get_last_error (aox4000_handle_t *handle, aox4000_status_t *status)
 get last error
uint8_t aox4000_command_read (aox4000_handle_t *handle, char *buf, uint16_t len)
 command read
uint8_t aox4000_command_write (aox4000_handle_t *handle, char *buf, uint16_t len)
 command write

Detailed Description

driver aox4000 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.

Version
1.0.0
Author
Shifeng Li
Date
2024-11-30

history

Date Version Author Description
2024/11/30 1.0 Shifeng Li first upload

Definition in file driver_aox4000.h.