LibDriver APDS9960
Loading...
Searching...
No Matches
driver_apds9960_interrupt.h File Reference

driver apds9960 interrupt header file More...

Include dependency graph for driver_apds9960_interrupt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define APDS9960_INTERRUPT_DEFAULT_ADC_INTEGRATION_TIME   103.0f
 apds9960 interrupt example default definition
#define APDS9960_INTERRUPT_DEFAULT_WAIT_TIME   10.0f
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_INTERRUPT_CYCLE   APDS9960_PROXIMITY_INTERRUPT_CYCLE_2
#define APDS9960_INTERRUPT_DEFAULT_ALS_INTERRUPT_CYCLE   APDS9960_ALS_INTERRUPT_CYCLE_2
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_PULSE_LENGTH   APDS9960_PROXIMITY_PULSE_LENGTH_8_US
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_PULSE_COUNT   7
#define APDS9960_INTERRUPT_DEFAULT_LED_CURRENT   APDS9960_LED_CURRENT_100_MA
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_GAIN   APDS9960_PROXIMITY_GAIN_4X
#define APDS9960_INTERRUPT_DEFAULT_ALS_COLOR_GAIN   APDS9960_ALS_COLOR_GAIN_4X
#define APDS9960_INTERRUPT_DEFAULT_SATURATION_INTERRUPT_PROXIMITY   APDS9960_BOOL_FALSE
#define APDS9960_INTERRUPT_DEFAULT_SATURATION_INTERRUPT_CLEAR_PHOTODIODE   APDS9960_BOOL_FALSE
#define APDS9960_INTERRUPT_DEFAULT_LED_BOOST   APDS9960_LED_BOOST_100_PERCENTAGE
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_UP_RIGHT_OFFSET   0
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_DOWN_LEFT_OFFSET   0
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_GAIN_COMPENSATION   APDS9960_BOOL_FALSE
#define APDS9960_INTERRUPT_DEFAULT_SLEEP_AFTER_INTERRUPT   APDS9960_BOOL_FALSE
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_MASK_UP   APDS9960_BOOL_FALSE
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_MASK_DOWN   APDS9960_BOOL_FALSE
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_MASK_LEFT   APDS9960_BOOL_FALSE
#define APDS9960_INTERRUPT_DEFAULT_PROXIMITY_MASK_RIGHT   APDS9960_BOOL_FALSE
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_PROXIMITY_ENTER_THRESHOLD   0x00
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_PROXIMITY_EXIT_THRESHOLD   0xFF
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_FIFO_THRESHOLD   APDS9960_GESTURE_FIFO_THRESHOLD_8_DATASET
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_EXIT_PERSISTENCE   APDS9960_GESTURE_EXIT_PERSISTENCE_1ST
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_EXIT_MASK   0x00
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_GAIN   APDS9960_GESTURE_GAIN_2X
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_LED_CURRENT   APDS9960_GESTURE_LED_CURRENT_100_MA
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_WAIT_TIME   APDS9960_GESTURE_WAIT_TIME_2P8_MS
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_UP_OFFSET   0
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_DOWN_OFFSET   0
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_LEFT_OFFSET   0
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_RIGHT_OFFSET   0
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_PULSE_LENGTH   APDS9960_GESTURE_PULSE_LENGTH_32_US
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_PULSE_COUNT   9
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_DIMENSION   APDS9960_GESTURE_DIMENSION_SELECT_BOTH_PAIRS_ACTIVE
#define APDS9960_INTERRUPT_DEFAULT_GESTURE_INTERRUPT   APDS9960_BOOL_FALSE

Functions

uint8_t apds9960_interrupt_irq_handler (void)
 interrupt irq
uint8_t apds9960_interrupt_init (void(*callback)(uint8_t type), uint16_t als_low_threshold, uint16_t als_high_threshold, uint8_t proximity_low_threshold, uint8_t proximity_high_threshold)
 interrupt example init
uint8_t apds9960_interrupt_deinit (void)
 interrupt example deinit
uint8_t apds9960_interrupt_read_rgbc (uint16_t *red, uint16_t *green, uint16_t *blue, uint16_t *clear)
 interrupt example read rgbc
uint8_t apds9960_interrupt_read_proximity (uint8_t *proximity)
 interrupt example read proximity

Detailed Description

driver apds9960 interrupt 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
2022-01-23

history

Date Version Author Description
2022/01/23 1.0 Shifeng Li first upload

Definition in file driver_apds9960_interrupt.h.