/** ****************************************************************************** * @file 53l4a2_ranging_sensor.h * @author IMG SW Application Team * @brief This file contains the common defines and functions prototypes for * the 53l4a2_ranging_sensor.c driver. ****************************************************************************** * @attention * * Copyright (c) 2022 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef XNUCLEO_53L4A2_RANGING_SENSOR_H #define XNUCLEO_53L4A2_RANGING_SENSOR_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "ranging_sensor.h" #include "53l4a2_conf.h" #include "vl53l4cx.h" /** @addtogroup BSP * @{ */ /** @addtogroup XNUCLEO_53L4A2 * @{ */ /** @defgroup XNUCLEO_53L4A2_RANGING_SENSOR RANGING SENSOR * @{ */ /** @defgroup XNUCLEO_53L4A2_RANGING_SENSOR_Exported_Constants Exported Constants * @{ */ #define RANGING_SENSOR_VL53L4CX_ADDRESS (VL53L4CX_DEVICE_ADDRESS) #define RANGING_SENSOR_NB_TARGET_PER_ZONE (VL53L4CX_NB_TARGET_PER_ZONE) #define RANGING_SENSOR_MAX_NB_ZONES (VL53L4CX_MAX_NB_ZONES) #define RANGING_SENSOR_POWERMODE_ON (0U) /*!< Run */ #define RANGING_SENSOR_POWERMODE_OFF (1U) /*!< Standby */ #define RS_MODE_BLOCKING_CONTINUOUS (VL53L4CX_MODE_BLOCKING_CONTINUOUS) #define RS_MODE_BLOCKING_ONESHOT (VL53L4CX_MODE_BLOCKING_ONESHOT) #define RS_MODE_ASYNC_CONTINUOUS (VL53L4CX_MODE_ASYNC_CONTINUOUS) #define RS_MODE_ASYNC_ONESHOT (VL53L4CX_MODE_ASYNC_ONESHOT) #define RS_MULTI_TARGET_SHORT_RANGE (VL53L4CX_PROFILE_SHORT) #define RS_MULTI_TARGET_MEDIUM_RANGE (VL53L4CX_PROFILE_MEDIUM) #define RS_MULTI_TARGET_LONG_RANGE (VL53L4CX_PROFILE_LONG) #define VL53L4A2_DEV_LEFT (0U) /*!< left satellite device */ #define VL53L4A2_DEV_CENTER (1U) /*!< center (built-in) device */ #define VL53L4A2_DEV_RIGHT (2U) /*!< right satellite device */ /** * @} */ /** @defgroup XNUCLEO_53L4A2_RANGING_SENSOR_Exported_Types Exported Types * @{ */ typedef struct { uint32_t RangingProfile; uint32_t TimingBudget; /*!< Expressed in milliseconds */ uint32_t Frequency; /*!< Expressed in Hz */ uint32_t EnableAmbient; /*