Fork, renaming of VL53L1CB-2
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
inc/vl53l1_error_strings.h@13:3f1b341901dd, 2021-06-11 (annotated)
- Committer:
- Charles MacNeill
- Date:
- Fri Jun 11 17:08:27 2021 +0100
- Revision:
- 13:3f1b341901dd
- Parent:
- 7:1add29d51e72
changing case of vl53l1cb.* so it works in linux
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
charlesmn | 0:3ac96e360672 | 1 | |
Charles MacNeill |
7:1add29d51e72 | 2 | /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ |
Charles MacNeill |
7:1add29d51e72 | 3 | /****************************************************************************** |
charlesmn | 0:3ac96e360672 | 4 | * Copyright (c) 2020, STMicroelectronics - All Rights Reserved |
charlesmn | 0:3ac96e360672 | 5 | |
Charles MacNeill |
7:1add29d51e72 | 6 | This file is part of VL53L1 and is dual licensed, |
Charles MacNeill |
7:1add29d51e72 | 7 | either GPL-2.0+ |
charlesmn | 0:3ac96e360672 | 8 | or 'BSD 3-clause "New" or "Revised" License' , at your option. |
Charles MacNeill |
7:1add29d51e72 | 9 | ****************************************************************************** |
Charles MacNeill |
7:1add29d51e72 | 10 | */ |
charlesmn | 0:3ac96e360672 | 11 | |
charlesmn | 0:3ac96e360672 | 12 | |
charlesmn | 0:3ac96e360672 | 13 | |
charlesmn | 0:3ac96e360672 | 14 | |
charlesmn | 0:3ac96e360672 | 15 | |
charlesmn | 0:3ac96e360672 | 16 | #ifndef VL53L1_ERROR_STRINGS_H_ |
charlesmn | 0:3ac96e360672 | 17 | #define VL53L1_ERROR_STRINGS_H_ |
charlesmn | 0:3ac96e360672 | 18 | |
charlesmn | 0:3ac96e360672 | 19 | #include "vl53l1_error_codes.h" |
charlesmn | 0:3ac96e360672 | 20 | |
charlesmn | 0:3ac96e360672 | 21 | #ifdef __cplusplus |
charlesmn | 0:3ac96e360672 | 22 | extern "C" { |
charlesmn | 0:3ac96e360672 | 23 | #endif |
charlesmn | 0:3ac96e360672 | 24 | |
charlesmn | 0:3ac96e360672 | 25 | |
charlesmn | 0:3ac96e360672 | 26 | |
charlesmn | 0:3ac96e360672 | 27 | |
charlesmn | 0:3ac96e360672 | 28 | VL53L1_Error VL53L1_get_pal_error_string( |
charlesmn | 0:3ac96e360672 | 29 | VL53L1_Error PalErrorCode, |
charlesmn | 0:3ac96e360672 | 30 | char *pPalErrorString); |
charlesmn | 0:3ac96e360672 | 31 | |
charlesmn | 0:3ac96e360672 | 32 | |
charlesmn | 0:3ac96e360672 | 33 | #ifndef VL53L1_USE_EMPTY_STRING |
charlesmn | 0:3ac96e360672 | 34 | |
charlesmn | 0:3ac96e360672 | 35 | |
charlesmn | 0:3ac96e360672 | 36 | #define VL53L1_STRING_ERROR_NONE \ |
charlesmn | 0:3ac96e360672 | 37 | "No Error" |
charlesmn | 0:3ac96e360672 | 38 | #define VL53L1_STRING_ERROR_CALIBRATION_WARNING \ |
charlesmn | 0:3ac96e360672 | 39 | "Calibration Warning Error" |
charlesmn | 0:3ac96e360672 | 40 | #define VL53L1_STRING_ERROR_MIN_CLIPPED \ |
charlesmn | 0:3ac96e360672 | 41 | "Min clipped error" |
charlesmn | 0:3ac96e360672 | 42 | #define VL53L1_STRING_ERROR_UNDEFINED \ |
charlesmn | 0:3ac96e360672 | 43 | "Undefined error" |
charlesmn | 0:3ac96e360672 | 44 | #define VL53L1_STRING_ERROR_INVALID_PARAMS \ |
charlesmn | 0:3ac96e360672 | 45 | "Invalid parameters error" |
charlesmn | 0:3ac96e360672 | 46 | #define VL53L1_STRING_ERROR_NOT_SUPPORTED \ |
charlesmn | 0:3ac96e360672 | 47 | "Not supported error" |
charlesmn | 0:3ac96e360672 | 48 | #define VL53L1_STRING_ERROR_RANGE_ERROR \ |
charlesmn | 0:3ac96e360672 | 49 | "Range error" |
charlesmn | 0:3ac96e360672 | 50 | #define VL53L1_STRING_ERROR_TIME_OUT \ |
charlesmn | 0:3ac96e360672 | 51 | "Time out error" |
charlesmn | 0:3ac96e360672 | 52 | #define VL53L1_STRING_ERROR_MODE_NOT_SUPPORTED \ |
charlesmn | 0:3ac96e360672 | 53 | "Mode not supported error" |
charlesmn | 0:3ac96e360672 | 54 | #define VL53L1_STRING_ERROR_BUFFER_TOO_SMALL \ |
charlesmn | 0:3ac96e360672 | 55 | "Buffer too small" |
charlesmn | 0:3ac96e360672 | 56 | #define VL53L1_STRING_ERROR_COMMS_BUFFER_TOO_SMALL \ |
charlesmn | 0:3ac96e360672 | 57 | "Comms Buffer too small" |
charlesmn | 0:3ac96e360672 | 58 | #define VL53L1_STRING_ERROR_GPIO_NOT_EXISTING \ |
charlesmn | 0:3ac96e360672 | 59 | "GPIO not existing" |
charlesmn | 0:3ac96e360672 | 60 | #define VL53L1_STRING_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED \ |
charlesmn | 0:3ac96e360672 | 61 | "GPIO funct not supported" |
charlesmn | 0:3ac96e360672 | 62 | #define VL53L1_STRING_ERROR_CONTROL_INTERFACE \ |
charlesmn | 0:3ac96e360672 | 63 | "Control Interface Error" |
charlesmn | 0:3ac96e360672 | 64 | #define VL53L1_STRING_ERROR_INVALID_COMMAND \ |
charlesmn | 0:3ac96e360672 | 65 | "Invalid Command Error" |
charlesmn | 0:3ac96e360672 | 66 | #define VL53L1_STRING_ERROR_DIVISION_BY_ZERO \ |
charlesmn | 0:3ac96e360672 | 67 | "Division by zero Error" |
charlesmn | 0:3ac96e360672 | 68 | #define VL53L1_STRING_ERROR_REF_SPAD_INIT \ |
charlesmn | 0:3ac96e360672 | 69 | "Reference Spad Init Error" |
charlesmn | 0:3ac96e360672 | 70 | #define VL53L1_STRING_ERROR_GPH_SYNC_CHECK_FAIL \ |
charlesmn | 0:3ac96e360672 | 71 | "GPH Sync Check Fail - API out of sync" |
charlesmn | 0:3ac96e360672 | 72 | #define VL53L1_STRING_ERROR_STREAM_COUNT_CHECK_FAIL \ |
charlesmn | 0:3ac96e360672 | 73 | "Stream Count Check Fail - API out of sync" |
charlesmn | 0:3ac96e360672 | 74 | #define VL53L1_STRING_ERROR_GPH_ID_CHECK_FAIL \ |
charlesmn | 0:3ac96e360672 | 75 | "GPH ID Check Fail - API out of sync" |
charlesmn | 0:3ac96e360672 | 76 | #define VL53L1_STRING_ERROR_ZONE_STREAM_COUNT_CHECK_FAIL \ |
charlesmn | 0:3ac96e360672 | 77 | "Zone Stream Count Check Fail - API out of sync" |
charlesmn | 0:3ac96e360672 | 78 | #define VL53L1_STRING_ERROR_ZONE_GPH_ID_CHECK_FAIL \ |
charlesmn | 0:3ac96e360672 | 79 | "Zone GPH ID Check Fail - API out of sync" |
charlesmn | 0:3ac96e360672 | 80 | |
charlesmn | 0:3ac96e360672 | 81 | #define VL53L1_STRING_ERROR_XTALK_EXTRACTION_NO_SAMPLES_FAIL \ |
charlesmn | 0:3ac96e360672 | 82 | "No Xtalk using full array - Xtalk Extract Fail" |
charlesmn | 0:3ac96e360672 | 83 | #define VL53L1_STRING_ERROR_XTALK_EXTRACTION_SIGMA_LIMIT_FAIL \ |
charlesmn | 0:3ac96e360672 | 84 | "Xtalk does not meet required VL53L1_p_011 limit - Xtalk Extract Fail" |
charlesmn | 0:3ac96e360672 | 85 | |
charlesmn | 0:3ac96e360672 | 86 | #define VL53L1_STRING_ERROR_OFFSET_CAL_NO_SAMPLE_FAIL \ |
charlesmn | 0:3ac96e360672 | 87 | "Offset Cal - one of more stages with no valid samples - fatal" |
charlesmn | 0:3ac96e360672 | 88 | #define VL53L1_STRING_ERROR_OFFSET_CAL_NO_SPADS_ENABLED_FAIL \ |
charlesmn | 0:3ac96e360672 | 89 | "Offset Cal - one of more stages with no SPADS enables - fatal" |
charlesmn | 0:3ac96e360672 | 90 | #define VL53L1_STRING_ERROR_ZONE_CAL_NO_SAMPLE_FAIL \ |
charlesmn | 0:3ac96e360672 | 91 | "Zone Cal - one of more zones with no valid samples - fatal" |
charlesmn | 0:3ac96e360672 | 92 | |
charlesmn | 0:3ac96e360672 | 93 | #define VL53L1_STRING_WARNING_REF_SPAD_CHAR_NOT_ENOUGH_SPADS \ |
charlesmn | 0:3ac96e360672 | 94 | "Ref SPAD Char - Not Enough Good SPADs" |
charlesmn | 0:3ac96e360672 | 95 | #define VL53L1_STRING_WARNING_REF_SPAD_CHAR_RATE_TOO_HIGH \ |
charlesmn | 0:3ac96e360672 | 96 | "Ref SPAD Char - Final Ref Rate too high" |
charlesmn | 0:3ac96e360672 | 97 | #define VL53L1_STRING_WARNING_REF_SPAD_CHAR_RATE_TOO_LOW \ |
charlesmn | 0:3ac96e360672 | 98 | "Ref SPAD Char - Final Ref Rate too low" |
charlesmn | 0:3ac96e360672 | 99 | |
charlesmn | 0:3ac96e360672 | 100 | #define VL53L1_STRING_WARNING_OFFSET_CAL_MISSING_SAMPLES \ |
charlesmn | 0:3ac96e360672 | 101 | "Offset Cal - Less than the requested number of valid samples" |
charlesmn | 0:3ac96e360672 | 102 | #define VL53L1_STRING_WARNING_OFFSET_CAL_SIGMA_TOO_HIGH \ |
charlesmn | 0:3ac96e360672 | 103 | "Offset Cal - Sigma estimate value too high - offset not stable" |
charlesmn | 0:3ac96e360672 | 104 | #define VL53L1_STRING_WARNING_OFFSET_CAL_RATE_TOO_HIGH \ |
charlesmn | 0:3ac96e360672 | 105 | "Offset Cal - Rate too high - in pile up" |
charlesmn | 0:3ac96e360672 | 106 | #define VL53L1_STRING_WARNING_OFFSET_CAL_SPAD_COUNT_TOO_LOW \ |
charlesmn | 0:3ac96e360672 | 107 | "Offset Cal - Insufficient SPADs - offset may not be stable" |
charlesmn | 0:3ac96e360672 | 108 | |
charlesmn | 0:3ac96e360672 | 109 | #define VL53L1_STRING_WARNING_ZONE_CAL_MISSING_SAMPLES \ |
charlesmn | 0:3ac96e360672 | 110 | "Zone Cal - One or more zone with less than requested valid samples" |
charlesmn | 0:3ac96e360672 | 111 | #define VL53L1_STRING_WARNING_ZONE_CAL_SIGMA_TOO_HIGH \ |
charlesmn | 0:3ac96e360672 | 112 | "Zone Cal - One of more zones the VL53L1_p_011 estimate too high" |
charlesmn | 0:3ac96e360672 | 113 | #define VL53L1_STRING_WARNING_ZONE_CAL_RATE_TOO_HIGH \ |
charlesmn | 0:3ac96e360672 | 114 | "Zone Cal - One of more zones with rate too high - in pile up" |
charlesmn | 0:3ac96e360672 | 115 | |
charlesmn | 0:3ac96e360672 | 116 | #define VL53L1_STRING_WARNING_XTALK_NO_SAMPLES_FOR_GRADIENT \ |
charlesmn | 0:3ac96e360672 | 117 | "Xtalk - Gradient sample num = 0" |
charlesmn | 0:3ac96e360672 | 118 | #define VL53L1_STRING_WARNING_XTALK_SIGMA_LIMIT_FOR_GRADIENT \ |
charlesmn | 0:3ac96e360672 | 119 | "Xtalk - Gradient Sigma > Limit" |
charlesmn | 0:3ac96e360672 | 120 | #define VL53L1_STRING_WARNING_XTALK_MISSING_SAMPLES \ |
charlesmn | 0:3ac96e360672 | 121 | "Xtalk - Some missing and invalid samples" |
charlesmn | 0:3ac96e360672 | 122 | |
charlesmn | 0:3ac96e360672 | 123 | #define VL53L1_STRING_ERROR_DEVICE_FIRMWARE_TOO_OLD \ |
charlesmn | 0:3ac96e360672 | 124 | "Device Firmware too old" |
charlesmn | 0:3ac96e360672 | 125 | #define VL53L1_STRING_ERROR_DEVICE_FIRMWARE_TOO_NEW \ |
charlesmn | 0:3ac96e360672 | 126 | "Device Firmware too new" |
charlesmn | 0:3ac96e360672 | 127 | #define VL53L1_STRING_ERROR_UNIT_TEST_FAIL \ |
charlesmn | 0:3ac96e360672 | 128 | "Unit Test Fail" |
charlesmn | 0:3ac96e360672 | 129 | #define VL53L1_STRING_ERROR_FILE_READ_FAIL \ |
charlesmn | 0:3ac96e360672 | 130 | "File Read Fail" |
charlesmn | 0:3ac96e360672 | 131 | #define VL53L1_STRING_ERROR_FILE_WRITE_FAIL \ |
charlesmn | 0:3ac96e360672 | 132 | "File Write Fail" |
charlesmn | 0:3ac96e360672 | 133 | |
charlesmn | 0:3ac96e360672 | 134 | #define VL53L1_STRING_ERROR_NOT_IMPLEMENTED \ |
charlesmn | 0:3ac96e360672 | 135 | "Not implemented error" |
charlesmn | 0:3ac96e360672 | 136 | #define VL53L1_STRING_UNKNOW_ERROR_CODE \ |
charlesmn | 0:3ac96e360672 | 137 | "Unknown Error Code" |
charlesmn | 0:3ac96e360672 | 138 | |
charlesmn | 0:3ac96e360672 | 139 | #endif |
charlesmn | 0:3ac96e360672 | 140 | |
charlesmn | 0:3ac96e360672 | 141 | |
charlesmn | 0:3ac96e360672 | 142 | #ifdef __cplusplus |
charlesmn | 0:3ac96e360672 | 143 | } |
charlesmn | 0:3ac96e360672 | 144 | #endif |
charlesmn | 0:3ac96e360672 | 145 | |
charlesmn | 0:3ac96e360672 | 146 | #endif |
charlesmn | 0:3ac96e360672 | 147 | |
charlesmn | 0:3ac96e360672 | 148 |