ST Expansion SW Team / VL53L1

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_53L1CB

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers vl53l1_api_strings.h Source File

vl53l1_api_strings.h

Go to the documentation of this file.
00001 
00002 /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
00003 /******************************************************************************
00004  * Copyright (c) 2020, STMicroelectronics - All Rights Reserved
00005 
00006  This file is part of VL53L1 and is dual licensed,
00007  either GPL-2.0+
00008  or 'BSD 3-clause "New" or "Revised" License' , at your option.
00009  ******************************************************************************
00010  */
00011 
00012 /**
00013  * @file   vl53l1_api_strings.h
00014  * @brief  VL53L1 API function declarations for decoding error codes to a
00015  *         text strings
00016  */
00017 
00018 
00019 #ifndef VL53L1_API_STRINGS_H_
00020 #define VL53L1_API_STRINGS_H_
00021 
00022 #include "vl53l1_def.h"
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 
00029 
00030 /**
00031  * @brief Generates a string for the input device range status code
00032  *
00033  * @param[in]   RangeStatus           : Device Range AStatus Code
00034  * @param[out]  pRangeStatusString    : pointer to character buffer
00035  *
00036  * @return  VL53L1_ERROR_NONE     Success
00037  * @return  "Other error code"    See ::VL53L1_Error
00038  */
00039 
00040 VL53L1_Error VL53L1_get_range_status_string(
00041     uint8_t   RangeStatus,
00042     char    *pRangeStatusString);
00043 
00044 /**
00045  * @brief Generates an error string for the input PAL error code
00046  *
00047  * @param[in]   PalErrorCode         : PAL Error Code
00048  * @param[out]  pPalErrorString      : pointer to character buffer
00049  *
00050  * @return  VL53L1_ERROR_NONE     Success
00051  * @return  "Other error code"    See ::VL53L1_Error
00052  */
00053 
00054 VL53L1_Error VL53L1_get_pal_error_string(
00055     VL53L1_Error   PalErrorCode,
00056     char         *pPalErrorString);
00057 
00058 /**
00059  * @brief Generates a string for the input PAL State code
00060  *
00061  * @param[in]   PalStateCode         : PAL State Code
00062  * @param[out]  pPalStateString      : pointer to character buffer
00063  *
00064  * @return  VL53L1_ERROR_NONE     Success
00065  * @return  "Other error code"    See ::VL53L1_Error
00066  */
00067 
00068 VL53L1_Error VL53L1_get_pal_state_string(
00069     VL53L1_State   PalStateCode,
00070     char         *pPalStateString);
00071 
00072 
00073 /**
00074  * @brief Generates a string for the sequence step Id
00075  *
00076  * @param[in]   SequenceStepId            : Sequence Step Id
00077  * @param[out]  pSequenceStepsString      : pointer to character buffer
00078  *
00079  * @return  VL53L1_ERROR_NONE     Success
00080  * @return  "Other error code"    See ::VL53L1_Error
00081  */
00082 VL53L1_Error VL53L1_get_sequence_steps_info(
00083         VL53L1_SequenceStepId SequenceStepId,
00084         char *pSequenceStepsString);
00085 
00086 /**
00087  * @brief Generates a string for the limit check Id
00088  *
00089  * @param[in]   LimitCheckId            : Limit check Id
00090  * @param[out]  pLimitCheckString       : pointer to character buffer
00091  *
00092  * @return  VL53L1_ERROR_NONE     Success
00093  * @return  "Other error code"    See ::VL53L1_Error
00094  */
00095 VL53L1_Error VL53L1_get_limit_check_info(uint16_t LimitCheckId,
00096     char *pLimitCheckString);
00097 
00098 #ifndef VL53L1_USE_EMPTY_STRING
00099     #define  VL53L1_STRING_DEVICE_INFO_NAME0          "VL53L1 cut1.0"
00100     #define  VL53L1_STRING_DEVICE_INFO_NAME1          "VL53L1 cut1.1"
00101     #define  VL53L1_STRING_DEVICE_INFO_TYPE          "VL53L1"
00102 
00103     /* Range Status */
00104     #define  VL53L1_STRING_RANGESTATUS_NONE                 "No Update"
00105     #define  VL53L1_STRING_RANGESTATUS_RANGEVALID           "Range Valid"
00106     #define  VL53L1_STRING_RANGESTATUS_SIGMA                "Sigma Fail"
00107     #define  VL53L1_STRING_RANGESTATUS_SIGNAL               "Signal Fail"
00108     #define  VL53L1_STRING_RANGESTATUS_MINRANGE             "Min Range Fail"
00109     #define  VL53L1_STRING_RANGESTATUS_PHASE                "Phase Fail"
00110     #define  VL53L1_STRING_RANGESTATUS_HW                   "Hardware Fail"
00111 
00112 
00113     /* Range Status */
00114     #define  VL53L1_STRING_STATE_POWERDOWN               "POWERDOWN State"
00115     #define  VL53L1_STRING_STATE_WAIT_STATICINIT \
00116             "Wait for staticinit State"
00117     #define  VL53L1_STRING_STATE_STANDBY                 "STANDBY State"
00118     #define  VL53L1_STRING_STATE_IDLE                    "IDLE State"
00119     #define  VL53L1_STRING_STATE_RUNNING                 "RUNNING State"
00120     #define  VL53L1_STRING_STATE_RESET                   "RESET State"
00121     #define  VL53L1_STRING_STATE_UNKNOWN                 "UNKNOWN State"
00122     #define  VL53L1_STRING_STATE_ERROR                   "ERROR State"
00123 
00124 
00125 
00126     /* Check Enable */
00127     #define  VL53L1_STRING_CHECKENABLE_SIGMA_FINAL_RANGE \
00128             "SIGMA FINAL RANGE"
00129     #define  VL53L1_STRING_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE \
00130             "SIGNAL RATE FINAL RANGE"
00131     #define  VL53L1_STRING_CHECKENABLE_SIGNAL_MIN_CLIP \
00132             "SIGNAL MIN CLIP"
00133     #define  VL53L1_STRING_CHECKENABLE_RANGE_IGNORE_THRESHOLD \
00134             "RANGE IGNORE THRESHOLD"
00135     #define  VL53L1_STRING_CHECKENABLE_RANGE_PHASE_HIGH \
00136             "RANGE PHASE HIGH"
00137     #define  VL53L1_STRING_CHECKENABLE_RANGE_PHASE_LOW \
00138             "RANGE PHASE LOW"
00139     #define  VL53L1_STRING_CHECKENABLE_RANGE_PHASE_CONSISTENCY \
00140             "RANGE PHASE CONSISTENCY"
00141 
00142     /* Sequence Step */
00143     #define  VL53L1_STRING_SEQUENCESTEP_VHV         "VHV"
00144     #define  VL53L1_STRING_SEQUENCESTEP_PHASECAL    "PHASE CAL"
00145     #define  VL53L1_STRING_SEQUENCESTEP_REFPHASE    "REF PHASE"
00146     #define  VL53L1_STRING_SEQUENCESTEP_DSS1        "DSS1"
00147     #define  VL53L1_STRING_SEQUENCESTEP_DSS2        "DSS2"
00148     #define  VL53L1_STRING_SEQUENCESTEP_MM1         "MM1"
00149     #define  VL53L1_STRING_SEQUENCESTEP_MM2         "MM2"
00150     #define  VL53L1_STRING_SEQUENCESTEP_RANGE       "RANGE"
00151 #endif /* VL53L1_USE_EMPTY_STRING */
00152 
00153 
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 
00158 #endif
00159