![]() |
LibDriver TCS34725
|
driver tcs34725 header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | tcs34725_handle_s |
| tcs34725 handle structure definition More... | |
| struct | tcs34725_info_s |
| tcs34725 information structure definition More... | |
Macros | |
| #define | DRIVER_TCS34725_LINK_INIT(HANDLE, STRUCTURE) |
| initialize tcs34725_handle_t structure | |
| #define | DRIVER_TCS34725_LINK_IIC_INIT(HANDLE, FUC) |
| link iic_init function | |
| #define | DRIVER_TCS34725_LINK_IIC_DEINIT(HANDLE, FUC) |
| link iic_deinit function | |
| #define | DRIVER_TCS34725_LINK_IIC_READ(HANDLE, FUC) |
| link iic_read function | |
| #define | DRIVER_TCS34725_LINK_IIC_WRITE(HANDLE, FUC) |
| link iic_write function | |
| #define | DRIVER_TCS34725_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_TCS34725_LINK_DEBUG_PRINT(HANDLE, FUC) |
| link debug_print function | |
Typedefs | |
| typedef struct tcs34725_handle_s | tcs34725_handle_t |
| tcs34725 handle structure definition | |
| typedef struct tcs34725_info_s | tcs34725_info_t |
| tcs34725 information structure definition | |
Functions | |
| uint8_t | tcs34725_info (tcs34725_info_t *info) |
| get chip information | |
| uint8_t | tcs34725_init (tcs34725_handle_t *handle) |
| initialize the chip | |
| uint8_t | tcs34725_deinit (tcs34725_handle_t *handle) |
| close the chip | |
| uint8_t | tcs34725_read_rgbc (tcs34725_handle_t *handle, uint16_t *red, uint16_t *green, uint16_t *blue, uint16_t *clear) |
| read the rgbc data | |
| uint8_t | tcs34725_read_rgb (tcs34725_handle_t *handle, uint16_t *red, uint16_t *green, uint16_t *blue) |
| read the rgb data | |
| uint8_t | tcs34725_read_c (tcs34725_handle_t *handle, uint16_t *clear) |
| read the clear data | |
| uint8_t | tcs34725_set_wait (tcs34725_handle_t *handle, tcs34725_bool_t enable) |
| enable or disable the wait time | |
| uint8_t | tcs34725_get_wait (tcs34725_handle_t *handle, tcs34725_bool_t *enable) |
| get the wait time | |
| uint8_t | tcs34725_set_rgbc (tcs34725_handle_t *handle, tcs34725_bool_t enable) |
| enable or disable the rgbc adc | |
| uint8_t | tcs34725_get_rgbc (tcs34725_handle_t *handle, tcs34725_bool_t *enable) |
| get the rgbc status | |
| uint8_t | tcs34725_set_power_on (tcs34725_handle_t *handle, tcs34725_bool_t enable) |
| enable or disable the power | |
| uint8_t | tcs34725_get_power_on (tcs34725_handle_t *handle, tcs34725_bool_t *enable) |
| get the power status | |
| uint8_t | tcs34725_set_rgbc_integration_time (tcs34725_handle_t *handle, tcs34725_integration_time_t t) |
| set the rgbc adc integration time | |
| uint8_t | tcs34725_get_rgbc_integration_time (tcs34725_handle_t *handle, tcs34725_integration_time_t *t) |
| get the rgbc adc integration time | |
| uint8_t | tcs34725_set_wait_time (tcs34725_handle_t *handle, tcs34725_wait_time_t t) |
| set the wait time | |
| uint8_t | tcs34725_get_wait_time (tcs34725_handle_t *handle, tcs34725_wait_time_t *t) |
| get the wait time | |
| uint8_t | tcs34725_set_gain (tcs34725_handle_t *handle, tcs34725_gain_t gain) |
| set the adc gain | |
| uint8_t | tcs34725_get_gain (tcs34725_handle_t *handle, tcs34725_gain_t *gain) |
| get the adc gain | |
| uint8_t | tcs34725_set_rgbc_interrupt (tcs34725_handle_t *handle, tcs34725_bool_t enable) |
| enable or disable the rgbc interrupt | |
| uint8_t | tcs34725_get_rgbc_interrupt (tcs34725_handle_t *handle, tcs34725_bool_t *enable) |
| get the rgbc interrupt | |
| uint8_t | tcs34725_set_interrupt_mode (tcs34725_handle_t *handle, tcs34725_interrupt_mode_t mode) |
| set the interrupt mode | |
| uint8_t | tcs34725_get_interrupt_mode (tcs34725_handle_t *handle, tcs34725_interrupt_mode_t *mode) |
| get the interrupt mode | |
| uint8_t | tcs34725_set_rgbc_clear_low_interrupt_threshold (tcs34725_handle_t *handle, uint16_t threshold) |
| set the rgbc clear low interrupt threshold | |
| uint8_t | tcs34725_get_rgbc_clear_low_interrupt_threshold (tcs34725_handle_t *handle, uint16_t *threshold) |
| get the rgbc clear low interrupt threshold | |
| uint8_t | tcs34725_set_rgbc_clear_high_interrupt_threshold (tcs34725_handle_t *handle, uint16_t threshold) |
| set the rgbc clear high interrupt threshold | |
| uint8_t | tcs34725_get_rgbc_clear_high_interrupt_threshold (tcs34725_handle_t *handle, uint16_t *threshold) |
| get the rgbc clear high interrupt threshold | |
| uint8_t | tcs34725_set_reg (tcs34725_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) |
| set the chip register | |
| uint8_t | tcs34725_get_reg (tcs34725_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) |
| get the chip register | |
driver tcs34725 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/02/28 | 2.0 | Shifeng Li | format the code |
| 2020/10/30 | 1.0 | Shifeng Li | first upload |
Definition in file driver_tcs34725.h.