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_error_strings.h Source File

vl53l1_error_strings.h

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 
00014 
00015 
00016 #ifndef VL53L1_ERROR_STRINGS_H_
00017 #define VL53L1_ERROR_STRINGS_H_
00018 
00019 #include "vl53l1_error_codes.h"
00020 
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024 
00025 
00026 
00027 
00028 VL53L1_Error VL53L1_get_pal_error_string(
00029     VL53L1_Error   PalErrorCode,
00030     char         *pPalErrorString);
00031 
00032 
00033 #ifndef VL53L1_USE_EMPTY_STRING
00034 
00035 
00036     #define  VL53L1_STRING_ERROR_NONE \
00037             "No Error"
00038     #define  VL53L1_STRING_ERROR_CALIBRATION_WARNING \
00039             "Calibration Warning Error"
00040     #define  VL53L1_STRING_ERROR_MIN_CLIPPED \
00041             "Min clipped error"
00042     #define  VL53L1_STRING_ERROR_UNDEFINED \
00043             "Undefined error"
00044     #define  VL53L1_STRING_ERROR_INVALID_PARAMS \
00045             "Invalid parameters error"
00046     #define  VL53L1_STRING_ERROR_NOT_SUPPORTED \
00047             "Not supported error"
00048     #define  VL53L1_STRING_ERROR_RANGE_ERROR \
00049             "Range error"
00050     #define  VL53L1_STRING_ERROR_TIME_OUT \
00051             "Time out error"
00052     #define  VL53L1_STRING_ERROR_MODE_NOT_SUPPORTED \
00053             "Mode not supported error"
00054     #define  VL53L1_STRING_ERROR_BUFFER_TOO_SMALL \
00055             "Buffer too small"
00056     #define  VL53L1_STRING_ERROR_COMMS_BUFFER_TOO_SMALL \
00057             "Comms Buffer too small"
00058     #define  VL53L1_STRING_ERROR_GPIO_NOT_EXISTING \
00059             "GPIO not existing"
00060     #define  VL53L1_STRING_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED \
00061             "GPIO funct not supported"
00062     #define  VL53L1_STRING_ERROR_CONTROL_INTERFACE \
00063             "Control Interface Error"
00064     #define  VL53L1_STRING_ERROR_INVALID_COMMAND \
00065             "Invalid Command Error"
00066     #define  VL53L1_STRING_ERROR_DIVISION_BY_ZERO \
00067             "Division by zero Error"
00068     #define  VL53L1_STRING_ERROR_REF_SPAD_INIT \
00069             "Reference Spad Init Error"
00070     #define  VL53L1_STRING_ERROR_GPH_SYNC_CHECK_FAIL \
00071             "GPH Sync Check Fail - API out of sync"
00072     #define  VL53L1_STRING_ERROR_STREAM_COUNT_CHECK_FAIL \
00073             "Stream Count Check Fail - API out of sync"
00074     #define  VL53L1_STRING_ERROR_GPH_ID_CHECK_FAIL \
00075             "GPH ID Check Fail - API out of sync"
00076     #define  VL53L1_STRING_ERROR_ZONE_STREAM_COUNT_CHECK_FAIL \
00077             "Zone Stream Count Check Fail - API out of sync"
00078     #define  VL53L1_STRING_ERROR_ZONE_GPH_ID_CHECK_FAIL \
00079             "Zone GPH ID Check Fail - API out of sync"
00080 
00081     #define  VL53L1_STRING_ERROR_XTALK_EXTRACTION_NO_SAMPLES_FAIL \
00082             "No Xtalk using full array - Xtalk Extract Fail"
00083     #define  VL53L1_STRING_ERROR_XTALK_EXTRACTION_SIGMA_LIMIT_FAIL \
00084             "Xtalk does not meet required VL53L1_p_011 limit - Xtalk Extract Fail"
00085 
00086     #define  VL53L1_STRING_ERROR_OFFSET_CAL_NO_SAMPLE_FAIL \
00087         "Offset Cal - one of more stages with no valid samples - fatal"
00088     #define  VL53L1_STRING_ERROR_OFFSET_CAL_NO_SPADS_ENABLED_FAIL \
00089         "Offset Cal - one of more stages with no SPADS enables - fatal"
00090     #define  VL53L1_STRING_ERROR_ZONE_CAL_NO_SAMPLE_FAIL \
00091         "Zone Cal - one of more zones with no valid samples - fatal"
00092 
00093     #define  VL53L1_STRING_WARNING_REF_SPAD_CHAR_NOT_ENOUGH_SPADS \
00094         "Ref SPAD Char - Not Enough Good SPADs"
00095     #define  VL53L1_STRING_WARNING_REF_SPAD_CHAR_RATE_TOO_HIGH \
00096         "Ref SPAD Char - Final Ref Rate too high"
00097     #define  VL53L1_STRING_WARNING_REF_SPAD_CHAR_RATE_TOO_LOW \
00098         "Ref SPAD Char - Final Ref Rate too low"
00099 
00100     #define  VL53L1_STRING_WARNING_OFFSET_CAL_MISSING_SAMPLES \
00101         "Offset Cal - Less than the requested number of valid samples"
00102     #define  VL53L1_STRING_WARNING_OFFSET_CAL_SIGMA_TOO_HIGH \
00103         "Offset Cal - Sigma estimate value too high - offset not stable"
00104     #define  VL53L1_STRING_WARNING_OFFSET_CAL_RATE_TOO_HIGH \
00105         "Offset Cal - Rate too high - in pile up"
00106     #define  VL53L1_STRING_WARNING_OFFSET_CAL_SPAD_COUNT_TOO_LOW \
00107         "Offset Cal - Insufficient SPADs - offset may not be stable"
00108 
00109     #define  VL53L1_STRING_WARNING_ZONE_CAL_MISSING_SAMPLES \
00110         "Zone Cal - One or more zone with less than requested valid samples"
00111     #define  VL53L1_STRING_WARNING_ZONE_CAL_SIGMA_TOO_HIGH \
00112         "Zone Cal - One of more zones the VL53L1_p_011 estimate too high"
00113     #define  VL53L1_STRING_WARNING_ZONE_CAL_RATE_TOO_HIGH \
00114         "Zone Cal - One of more zones with rate too high - in pile up"
00115 
00116     #define  VL53L1_STRING_WARNING_XTALK_NO_SAMPLES_FOR_GRADIENT \
00117             "Xtalk - Gradient sample num = 0"
00118     #define  VL53L1_STRING_WARNING_XTALK_SIGMA_LIMIT_FOR_GRADIENT \
00119             "Xtalk - Gradient Sigma > Limit"
00120     #define  VL53L1_STRING_WARNING_XTALK_MISSING_SAMPLES \
00121             "Xtalk - Some missing and invalid samples"
00122 
00123     #define  VL53L1_STRING_ERROR_DEVICE_FIRMWARE_TOO_OLD \
00124             "Device Firmware too old"
00125     #define  VL53L1_STRING_ERROR_DEVICE_FIRMWARE_TOO_NEW \
00126             "Device Firmware too new"
00127     #define  VL53L1_STRING_ERROR_UNIT_TEST_FAIL \
00128             "Unit Test Fail"
00129     #define  VL53L1_STRING_ERROR_FILE_READ_FAIL \
00130             "File Read Fail"
00131     #define  VL53L1_STRING_ERROR_FILE_WRITE_FAIL \
00132             "File Write Fail"
00133 
00134     #define  VL53L1_STRING_ERROR_NOT_IMPLEMENTED \
00135             "Not implemented error"
00136     #define  VL53L1_STRING_UNKNOW_ERROR_CODE \
00137             "Unknown Error Code"
00138 
00139 #endif
00140 
00141 
00142 #ifdef __cplusplus
00143 }
00144 #endif
00145 
00146 #endif
00147 
00148