Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of X_NUCLEO_53L0A1 by
Revision 20:cb95ef8a3508, committed 2017-12-15
- Comitter:
- mapellil
- Date:
- Fri Dec 15 14:13:04 2017 +0000
- Parent:
- 15:44e6c9013bff
- Commit message:
- Added vl53l0x_get_device() to extend API usability
Changed in this revision
--- a/Components/VL53L0X/vl53l0x_class.cpp Tue Aug 08 14:41:03 2017 +0000
+++ b/Components/VL53L0X/vl53l0x_class.cpp Fri Dec 15 14:13:04 2017 +0000
@@ -4008,6 +4008,12 @@
return status;
}
+VL53L0X_Error VL53L0X::vl53l0x_get_device(VL53L0X_DEV *dev)
+{
+ *dev = _device;
+ return VL53L0X_ERROR_NONE;
+}
+
VL53L0X_Error VL53L0X::vl53l0x_perform_ref_calibration(VL53L0X_DEV dev, uint8_t *p_vhv_settings,
uint8_t *p_phase_cal)
{
@@ -5205,6 +5211,7 @@
FixPoint1616_t signalLimit = (FixPoint1616_t)(0.25 * 65536);
FixPoint1616_t sigmaLimit = (FixPoint1616_t)(18 * 65536);
uint32_t timingBudget = 33000;
+// uint32_t timingBudget = 20*1000;
uint8_t preRangeVcselPeriod = 14;
uint8_t finalRangeVcselPeriod = 10;
@@ -5261,13 +5268,13 @@
/* Ranging configuration */
//*
// switch(rangingConfig) {
-// case LONG_RANGE:
- signalLimit = (FixPoint1616_t)(0.1 * 65536);
- sigmaLimit = (FixPoint1616_t)(60 * 65536);
- timingBudget = 33000;
- preRangeVcselPeriod = 18;
- finalRangeVcselPeriod = 14;
- /* break;
+/* case LONG_RANGE:
+ signalLimit = (FixPoint1616_t)(0.1 * 65536);
+ sigmaLimit = (FixPoint1616_t)(60 * 65536);
+ timingBudget = 33000;
+ preRangeVcselPeriod = 18;
+ finalRangeVcselPeriod = 14;
+ break;
case HIGH_ACCURACY:
signalLimit = (FixPoint1616_t)(0.25*65536);
sigmaLimit = (FixPoint1616_t)(18*65536);
@@ -5405,7 +5412,3 @@
/******************************************************************************/
-
-
-
-
--- a/Components/VL53L0X/vl53l0x_class.h Tue Aug 08 14:41:03 2017 +0000
+++ b/Components/VL53L0X/vl53l0x_class.h Fri Dec 15 14:13:04 2017 +0000
@@ -452,6 +452,26 @@
/**
*
+ * @brief Get the 53L0 device
+ *
+ * To be called to retrive the internal device descriptor to allow usage of
+ * low level API having device as parameter. To be called after set_device_address()
+ * (if any).
+ *
+ * @par Function Description
+ * To be called if low level API usage is needed as those functions requires
+ * device as a parameter.TICINIT.
+ *
+ * @note This function return a pointer to an object internal structure
+ *
+ * @param dev ptr to ptr to Device Handle
+ * @return VL53L0X_ERROR_NONE Success
+ * @return "Other error code" See ::VL53L0X_Error
+ */
+ VL53L0X_Error vl53l0x_get_device(VL53L0X_DEV *dev);
+
+ /**
+ *
* @brief One time device initialization
*
* To be called once and only once after device is brought out of reset (Chip enable) and booted.
@@ -625,7 +645,7 @@
* @return "Other error code" See ::VL53L0X_Error
*/
VL53L0X_Error vl53l0x_data_init(VL53L0X_DEV dev);
-
+
/**
* @brief Do basic device init (and eventually patch loading)
* This function will change the VL53L0X_State from
