![]() |
LibDriver MAX30205
|
driver max30205 header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | max30205_handle_s |
| max30205 handle structure definition More... | |
| struct | max30205_info_s |
| max30205 information structure definition More... | |
Macros | |
| #define | DRIVER_MAX30205_LINK_INIT(HANDLE, STRUCTURE) |
| initialize max30205_handle_t structure | |
| #define | DRIVER_MAX30205_LINK_IIC_INIT(HANDLE, FUC) |
| link iic_init function | |
| #define | DRIVER_MAX30205_LINK_IIC_DEINIT(HANDLE, FUC) |
| link iic_deinit function | |
| #define | DRIVER_MAX30205_LINK_IIC_READ(HANDLE, FUC) |
| link iic_read function | |
| #define | DRIVER_MAX30205_LINK_IIC_WRITE(HANDLE, FUC) |
| link iic_write function | |
| #define | DRIVER_MAX30205_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_MAX30205_LINK_DEBUG_PRINT(HANDLE, FUC) |
| link debug_print function | |
Typedefs | |
| typedef struct max30205_handle_s | max30205_handle_t |
| max30205 handle structure definition | |
| typedef struct max30205_info_s | max30205_info_t |
| max30205 information structure definition | |
Enumerations | |
| enum | max30205_address_t { MAX30205_ADDRESS_0 = (uint8_t)(0x90) , MAX30205_ADDRESS_1 = (uint8_t)(0x92) , MAX30205_ADDRESS_2 = (uint8_t)(0x82) , MAX30205_ADDRESS_3 = (uint8_t)(0x80) , MAX30205_ADDRESS_4 = (uint8_t)(0x94) , MAX30205_ADDRESS_5 = (uint8_t)(0x96) , MAX30205_ADDRESS_6 = (uint8_t)(0x86) , MAX30205_ADDRESS_7 = (uint8_t)(0x84) , MAX30205_ADDRESS_8 = (uint8_t)(0xB4) , MAX30205_ADDRESS_9 = (uint8_t)(0xB6) , MAX30205_ADDRESS_A = (uint8_t)(0xA6) , MAX30205_ADDRESS_B = (uint8_t)(0xA4) , MAX30205_ADDRESS_C = (uint8_t)(0xB0) , MAX30205_ADDRESS_D = (uint8_t)(0xB2) , MAX30205_ADDRESS_E = (uint8_t)(0xA2) , MAX30205_ADDRESS_F = (uint8_t)(0xA0) , MAX30205_ADDRESS_10 = (uint8_t)(0x98) , MAX30205_ADDRESS_11 = (uint8_t)(0x9A) , MAX30205_ADDRESS_12 = (uint8_t)(0x8A) , MAX30205_ADDRESS_13 = (uint8_t)(0x88) , MAX30205_ADDRESS_14 = (uint8_t)(0x9C) , MAX30205_ADDRESS_15 = (uint8_t)(0x9E) , MAX30205_ADDRESS_16 = (uint8_t)(0x8E) , MAX30205_ADDRESS_17 = (uint8_t)(0x8C) , MAX30205_ADDRESS_18 = (uint8_t)(0xBC) , MAX30205_ADDRESS_19 = (uint8_t)(0xBE) , MAX30205_ADDRESS_1A = (uint8_t)(0xAE) , MAX30205_ADDRESS_1B = (uint8_t)(0xAC) , MAX30205_ADDRESS_1C = (uint8_t)(0xB8) , MAX30205_ADDRESS_1D = (uint8_t)(0xBA) , MAX30205_ADDRESS_1E = (uint8_t)(0xAA) , MAX30205_ADDRESS_1F = (uint8_t)(0xA8) } |
| max30205 address enumeration definition More... | |
| enum | max30205_data_format_t { MAX30205_DATA_FORMAT_NORMAL = 0x00 , MAX30205_DATA_FORMAT_EXTENDED = 0x01 } |
| max30205 data format enumeration definition More... | |
| enum | max30205_bus_timeout_t { MAX30205_BUS_TIMEOUT_ENABLE = 0x00 , MAX30205_BUS_TIMEOUT_DISABLE = 0x01 } |
| max30205 bus timeout enumeration definition More... | |
| enum | max30205_interrupt_mode_t { MAX30205_INTERRUPT_MODE_COMPARATOR = 0x00 , MAX30205_INTERRUPT_MODE_INTERRUPT = 0x01 } |
| max30205 interrupt mode enumeration definition More... | |
| enum | max30205_fault_queue_t { MAX30205_FAULT_QUEUE_1 = 0x00 , MAX30205_FAULT_QUEUE_2 = 0x01 , MAX30205_FAULT_QUEUE_4 = 0x02 , MAX30205_FAULT_QUEUE_6 = 0x03 } |
| max30205 fault queue enumeration definition More... | |
| enum | max30205_pin_polarity_t { MAX30205_PIN_POLARITY_LOW = 0x00 , MAX30205_PIN_POLARITY_HIGH = 0x01 } |
| max30205 pin enumeration definition More... | |
Functions | |
| uint8_t | max30205_info (max30205_info_t *info) |
| get chip's information | |
| uint8_t | max30205_set_addr_pin (max30205_handle_t *handle, max30205_address_t addr_pin) |
| set the iic address pin | |
| uint8_t | max30205_get_addr_pin (max30205_handle_t *handle, max30205_address_t *addr_pin) |
| get the iic address pin | |
| uint8_t | max30205_init (max30205_handle_t *handle) |
| initialize the chip | |
| uint8_t | max30205_deinit (max30205_handle_t *handle) |
| close the chip | |
| uint8_t | max30205_start_continuous_read (max30205_handle_t *handle) |
| start reading data | |
| uint8_t | max30205_stop_continuous_read (max30205_handle_t *handle) |
| stop reading data | |
| uint8_t | max30205_continuous_read (max30205_handle_t *handle, int16_t *raw, float *s) |
| read data continuously | |
| uint8_t | max30205_single_read (max30205_handle_t *handle, int16_t *raw, float *s) |
| read data once | |
| uint8_t | max30205_set_data_format (max30205_handle_t *handle, max30205_data_format_t format) |
| set the chip data format | |
| uint8_t | max30205_get_data_format (max30205_handle_t *handle, max30205_data_format_t *format) |
| get the chip data format | |
| uint8_t | max30205_set_bus_timeout (max30205_handle_t *handle, max30205_bus_timeout_t bus_timeout) |
| set the iic bus timeout | |
| uint8_t | max30205_get_bus_timeout (max30205_handle_t *handle, max30205_bus_timeout_t *bus_timeout) |
| get the iic bus timeout | |
| uint8_t | max30205_power_down (max30205_handle_t *handle) |
| chip powers down | |
| uint8_t | max30205_set_interrupt_mode (max30205_handle_t *handle, max30205_interrupt_mode_t mode) |
| set the chip interrupt mode | |
| uint8_t | max30205_get_interrupt_mode (max30205_handle_t *handle, max30205_interrupt_mode_t *mode) |
| get the chip interrupt mode | |
| uint8_t | max30205_set_fault_queue (max30205_handle_t *handle, max30205_fault_queue_t fault_queue) |
| set the chip fault queue | |
| uint8_t | max30205_get_fault_queue (max30205_handle_t *handle, max30205_fault_queue_t *fault_queue) |
| get the chip fault queue | |
| uint8_t | max30205_set_pin_polarity (max30205_handle_t *handle, max30205_pin_polarity_t polarity) |
| set the interrupt pin polarity | |
| uint8_t | max30205_get_pin_polarity (max30205_handle_t *handle, max30205_pin_polarity_t *polarity) |
| get the interrupt pin polarity | |
| uint8_t | max30205_set_interrupt_low_threshold (max30205_handle_t *handle, int16_t threshold) |
| set the chip interrupt low threshold | |
| uint8_t | max30205_get_interrupt_low_threshold (max30205_handle_t *handle, int16_t *threshold) |
| get the chip interrupt low threshold | |
| uint8_t | max30205_set_interrupt_high_threshold (max30205_handle_t *handle, int16_t threshold) |
| set the chip interrupt high threshold | |
| uint8_t | max30205_get_interrupt_high_threshold (max30205_handle_t *handle, int16_t *threshold) |
| get the chip interrupt high threshold | |
| uint8_t | max30205_convert_to_register (max30205_handle_t *handle, float s, int16_t *reg) |
| convert a temperature value to a register raw data | |
| uint8_t | max30205_convert_to_data (max30205_handle_t *handle, int16_t reg, float *s) |
| convert a register raw data to a converted temperature data | |
| uint8_t | max30205_set_reg (max30205_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) |
| set the chip register | |
| uint8_t | max30205_get_reg (max30205_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) |
| get the chip register | |
driver max30205 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 |
|---|---|---|---|
| 2021/03/13 | 2.0 | Shifeng Li | format the code |
| 2020/11/25 | 1.0 | Shifeng Li | first upload |
Definition in file driver_max30205.h.