Fork, renaming of VL53L1CB-2
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
inc/vl53l1_api_strings.h@7:1add29d51e72, 2021-06-08 (annotated)
- Committer:
- Charles MacNeill
- Date:
- Tue Jun 08 10:34:47 2021 +0100
- Revision:
- 7:1add29d51e72
- Parent:
- 0:3ac96e360672
Update to v6.6.5 of bare_driver
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 */ |
charlesmn | 0:3ac96e360672 | 3 | /****************************************************************************** |
Charles MacNeill |
7:1add29d51e72 | 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+ |
Charles MacNeill |
7:1add29d51e72 | 8 | or 'BSD 3-clause "New" or "Revised" License' , at your option. |
Charles MacNeill |
7:1add29d51e72 | 9 | ****************************************************************************** |
charlesmn | 0:3ac96e360672 | 10 | */ |
charlesmn | 0:3ac96e360672 | 11 | |
charlesmn | 0:3ac96e360672 | 12 | /** |
charlesmn | 0:3ac96e360672 | 13 | * @file vl53l1_api_strings.h |
charlesmn | 0:3ac96e360672 | 14 | * @brief VL53L1 API function declarations for decoding error codes to a |
charlesmn | 0:3ac96e360672 | 15 | * text strings |
charlesmn | 0:3ac96e360672 | 16 | */ |
charlesmn | 0:3ac96e360672 | 17 | |
charlesmn | 0:3ac96e360672 | 18 | |
charlesmn | 0:3ac96e360672 | 19 | #ifndef VL53L1_API_STRINGS_H_ |
charlesmn | 0:3ac96e360672 | 20 | #define VL53L1_API_STRINGS_H_ |
charlesmn | 0:3ac96e360672 | 21 | |
charlesmn | 0:3ac96e360672 | 22 | #include "vl53l1_def.h" |
charlesmn | 0:3ac96e360672 | 23 | |
charlesmn | 0:3ac96e360672 | 24 | #ifdef __cplusplus |
charlesmn | 0:3ac96e360672 | 25 | extern "C" { |
charlesmn | 0:3ac96e360672 | 26 | #endif |
charlesmn | 0:3ac96e360672 | 27 | |
charlesmn | 0:3ac96e360672 | 28 | |
charlesmn | 0:3ac96e360672 | 29 | |
charlesmn | 0:3ac96e360672 | 30 | /** |
charlesmn | 0:3ac96e360672 | 31 | * @brief Generates a string for the input device range status code |
charlesmn | 0:3ac96e360672 | 32 | * |
charlesmn | 0:3ac96e360672 | 33 | * @param[in] RangeStatus : Device Range AStatus Code |
charlesmn | 0:3ac96e360672 | 34 | * @param[out] pRangeStatusString : pointer to character buffer |
charlesmn | 0:3ac96e360672 | 35 | * |
charlesmn | 0:3ac96e360672 | 36 | * @return VL53L1_ERROR_NONE Success |
charlesmn | 0:3ac96e360672 | 37 | * @return "Other error code" See ::VL53L1_Error |
charlesmn | 0:3ac96e360672 | 38 | */ |
charlesmn | 0:3ac96e360672 | 39 | |
charlesmn | 0:3ac96e360672 | 40 | VL53L1_Error VL53L1_get_range_status_string( |
charlesmn | 0:3ac96e360672 | 41 | uint8_t RangeStatus, |
charlesmn | 0:3ac96e360672 | 42 | char *pRangeStatusString); |
charlesmn | 0:3ac96e360672 | 43 | |
charlesmn | 0:3ac96e360672 | 44 | /** |
charlesmn | 0:3ac96e360672 | 45 | * @brief Generates an error string for the input PAL error code |
charlesmn | 0:3ac96e360672 | 46 | * |
charlesmn | 0:3ac96e360672 | 47 | * @param[in] PalErrorCode : PAL Error Code |
charlesmn | 0:3ac96e360672 | 48 | * @param[out] pPalErrorString : pointer to character buffer |
charlesmn | 0:3ac96e360672 | 49 | * |
charlesmn | 0:3ac96e360672 | 50 | * @return VL53L1_ERROR_NONE Success |
charlesmn | 0:3ac96e360672 | 51 | * @return "Other error code" See ::VL53L1_Error |
charlesmn | 0:3ac96e360672 | 52 | */ |
charlesmn | 0:3ac96e360672 | 53 | |
charlesmn | 0:3ac96e360672 | 54 | VL53L1_Error VL53L1_get_pal_error_string( |
charlesmn | 0:3ac96e360672 | 55 | VL53L1_Error PalErrorCode, |
charlesmn | 0:3ac96e360672 | 56 | char *pPalErrorString); |
charlesmn | 0:3ac96e360672 | 57 | |
charlesmn | 0:3ac96e360672 | 58 | /** |
charlesmn | 0:3ac96e360672 | 59 | * @brief Generates a string for the input PAL State code |
charlesmn | 0:3ac96e360672 | 60 | * |
charlesmn | 0:3ac96e360672 | 61 | * @param[in] PalStateCode : PAL State Code |
charlesmn | 0:3ac96e360672 | 62 | * @param[out] pPalStateString : pointer to character buffer |
charlesmn | 0:3ac96e360672 | 63 | * |
charlesmn | 0:3ac96e360672 | 64 | * @return VL53L1_ERROR_NONE Success |
charlesmn | 0:3ac96e360672 | 65 | * @return "Other error code" See ::VL53L1_Error |
charlesmn | 0:3ac96e360672 | 66 | */ |
charlesmn | 0:3ac96e360672 | 67 | |
charlesmn | 0:3ac96e360672 | 68 | VL53L1_Error VL53L1_get_pal_state_string( |
charlesmn | 0:3ac96e360672 | 69 | VL53L1_State PalStateCode, |
charlesmn | 0:3ac96e360672 | 70 | char *pPalStateString); |
charlesmn | 0:3ac96e360672 | 71 | |
charlesmn | 0:3ac96e360672 | 72 | |
charlesmn | 0:3ac96e360672 | 73 | /** |
charlesmn | 0:3ac96e360672 | 74 | * @brief Generates a string for the sequence step Id |
charlesmn | 0:3ac96e360672 | 75 | * |
charlesmn | 0:3ac96e360672 | 76 | * @param[in] SequenceStepId : Sequence Step Id |
charlesmn | 0:3ac96e360672 | 77 | * @param[out] pSequenceStepsString : pointer to character buffer |
charlesmn | 0:3ac96e360672 | 78 | * |
charlesmn | 0:3ac96e360672 | 79 | * @return VL53L1_ERROR_NONE Success |
charlesmn | 0:3ac96e360672 | 80 | * @return "Other error code" See ::VL53L1_Error |
charlesmn | 0:3ac96e360672 | 81 | */ |
charlesmn | 0:3ac96e360672 | 82 | VL53L1_Error VL53L1_get_sequence_steps_info( |
charlesmn | 0:3ac96e360672 | 83 | VL53L1_SequenceStepId SequenceStepId, |
charlesmn | 0:3ac96e360672 | 84 | char *pSequenceStepsString); |
charlesmn | 0:3ac96e360672 | 85 | |
charlesmn | 0:3ac96e360672 | 86 | /** |
charlesmn | 0:3ac96e360672 | 87 | * @brief Generates a string for the limit check Id |
charlesmn | 0:3ac96e360672 | 88 | * |
charlesmn | 0:3ac96e360672 | 89 | * @param[in] LimitCheckId : Limit check Id |
charlesmn | 0:3ac96e360672 | 90 | * @param[out] pLimitCheckString : pointer to character buffer |
charlesmn | 0:3ac96e360672 | 91 | * |
charlesmn | 0:3ac96e360672 | 92 | * @return VL53L1_ERROR_NONE Success |
charlesmn | 0:3ac96e360672 | 93 | * @return "Other error code" See ::VL53L1_Error |
charlesmn | 0:3ac96e360672 | 94 | */ |
charlesmn | 0:3ac96e360672 | 95 | VL53L1_Error VL53L1_get_limit_check_info(uint16_t LimitCheckId, |
charlesmn | 0:3ac96e360672 | 96 | char *pLimitCheckString); |
charlesmn | 0:3ac96e360672 | 97 | |
charlesmn | 0:3ac96e360672 | 98 | #ifndef VL53L1_USE_EMPTY_STRING |
charlesmn | 0:3ac96e360672 | 99 | #define VL53L1_STRING_DEVICE_INFO_NAME0 "VL53L1 cut1.0" |
charlesmn | 0:3ac96e360672 | 100 | #define VL53L1_STRING_DEVICE_INFO_NAME1 "VL53L1 cut1.1" |
charlesmn | 0:3ac96e360672 | 101 | #define VL53L1_STRING_DEVICE_INFO_TYPE "VL53L1" |
charlesmn | 0:3ac96e360672 | 102 | |
charlesmn | 0:3ac96e360672 | 103 | /* Range Status */ |
charlesmn | 0:3ac96e360672 | 104 | #define VL53L1_STRING_RANGESTATUS_NONE "No Update" |
charlesmn | 0:3ac96e360672 | 105 | #define VL53L1_STRING_RANGESTATUS_RANGEVALID "Range Valid" |
charlesmn | 0:3ac96e360672 | 106 | #define VL53L1_STRING_RANGESTATUS_SIGMA "Sigma Fail" |
charlesmn | 0:3ac96e360672 | 107 | #define VL53L1_STRING_RANGESTATUS_SIGNAL "Signal Fail" |
charlesmn | 0:3ac96e360672 | 108 | #define VL53L1_STRING_RANGESTATUS_MINRANGE "Min Range Fail" |
charlesmn | 0:3ac96e360672 | 109 | #define VL53L1_STRING_RANGESTATUS_PHASE "Phase Fail" |
charlesmn | 0:3ac96e360672 | 110 | #define VL53L1_STRING_RANGESTATUS_HW "Hardware Fail" |
charlesmn | 0:3ac96e360672 | 111 | |
charlesmn | 0:3ac96e360672 | 112 | |
charlesmn | 0:3ac96e360672 | 113 | /* Range Status */ |
charlesmn | 0:3ac96e360672 | 114 | #define VL53L1_STRING_STATE_POWERDOWN "POWERDOWN State" |
charlesmn | 0:3ac96e360672 | 115 | #define VL53L1_STRING_STATE_WAIT_STATICINIT \ |
charlesmn | 0:3ac96e360672 | 116 | "Wait for staticinit State" |
charlesmn | 0:3ac96e360672 | 117 | #define VL53L1_STRING_STATE_STANDBY "STANDBY State" |
charlesmn | 0:3ac96e360672 | 118 | #define VL53L1_STRING_STATE_IDLE "IDLE State" |
charlesmn | 0:3ac96e360672 | 119 | #define VL53L1_STRING_STATE_RUNNING "RUNNING State" |
charlesmn | 0:3ac96e360672 | 120 | #define VL53L1_STRING_STATE_RESET "RESET State" |
charlesmn | 0:3ac96e360672 | 121 | #define VL53L1_STRING_STATE_UNKNOWN "UNKNOWN State" |
charlesmn | 0:3ac96e360672 | 122 | #define VL53L1_STRING_STATE_ERROR "ERROR State" |
charlesmn | 0:3ac96e360672 | 123 | |
charlesmn | 0:3ac96e360672 | 124 | |
charlesmn | 0:3ac96e360672 | 125 | |
charlesmn | 0:3ac96e360672 | 126 | /* Check Enable */ |
charlesmn | 0:3ac96e360672 | 127 | #define VL53L1_STRING_CHECKENABLE_SIGMA_FINAL_RANGE \ |
charlesmn | 0:3ac96e360672 | 128 | "SIGMA FINAL RANGE" |
charlesmn | 0:3ac96e360672 | 129 | #define VL53L1_STRING_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE \ |
charlesmn | 0:3ac96e360672 | 130 | "SIGNAL RATE FINAL RANGE" |
charlesmn | 0:3ac96e360672 | 131 | #define VL53L1_STRING_CHECKENABLE_SIGNAL_MIN_CLIP \ |
charlesmn | 0:3ac96e360672 | 132 | "SIGNAL MIN CLIP" |
charlesmn | 0:3ac96e360672 | 133 | #define VL53L1_STRING_CHECKENABLE_RANGE_IGNORE_THRESHOLD \ |
charlesmn | 0:3ac96e360672 | 134 | "RANGE IGNORE THRESHOLD" |
charlesmn | 0:3ac96e360672 | 135 | #define VL53L1_STRING_CHECKENABLE_RANGE_PHASE_HIGH \ |
charlesmn | 0:3ac96e360672 | 136 | "RANGE PHASE HIGH" |
charlesmn | 0:3ac96e360672 | 137 | #define VL53L1_STRING_CHECKENABLE_RANGE_PHASE_LOW \ |
charlesmn | 0:3ac96e360672 | 138 | "RANGE PHASE LOW" |
charlesmn | 0:3ac96e360672 | 139 | #define VL53L1_STRING_CHECKENABLE_RANGE_PHASE_CONSISTENCY \ |
charlesmn | 0:3ac96e360672 | 140 | "RANGE PHASE CONSISTENCY" |
charlesmn | 0:3ac96e360672 | 141 | |
charlesmn | 0:3ac96e360672 | 142 | /* Sequence Step */ |
charlesmn | 0:3ac96e360672 | 143 | #define VL53L1_STRING_SEQUENCESTEP_VHV "VHV" |
charlesmn | 0:3ac96e360672 | 144 | #define VL53L1_STRING_SEQUENCESTEP_PHASECAL "PHASE CAL" |
charlesmn | 0:3ac96e360672 | 145 | #define VL53L1_STRING_SEQUENCESTEP_REFPHASE "REF PHASE" |
charlesmn | 0:3ac96e360672 | 146 | #define VL53L1_STRING_SEQUENCESTEP_DSS1 "DSS1" |
charlesmn | 0:3ac96e360672 | 147 | #define VL53L1_STRING_SEQUENCESTEP_DSS2 "DSS2" |
charlesmn | 0:3ac96e360672 | 148 | #define VL53L1_STRING_SEQUENCESTEP_MM1 "MM1" |
charlesmn | 0:3ac96e360672 | 149 | #define VL53L1_STRING_SEQUENCESTEP_MM2 "MM2" |
charlesmn | 0:3ac96e360672 | 150 | #define VL53L1_STRING_SEQUENCESTEP_RANGE "RANGE" |
charlesmn | 0:3ac96e360672 | 151 | #endif /* VL53L1_USE_EMPTY_STRING */ |
charlesmn | 0:3ac96e360672 | 152 | |
charlesmn | 0:3ac96e360672 | 153 | |
charlesmn | 0:3ac96e360672 | 154 | #ifdef __cplusplus |
charlesmn | 0:3ac96e360672 | 155 | } |
charlesmn | 0:3ac96e360672 | 156 | #endif |
charlesmn | 0:3ac96e360672 | 157 | |
charlesmn | 0:3ac96e360672 | 158 | #endif |
charlesmn | 0:3ac96e360672 | 159 |