Condensed Version of Public VL53L0X

Dependents:   ToF-Only-Tryout

Revision:
12:aa177f0e4c10
Parent:
11:c6f95a42d4d7
--- a/VL53L0X.h	Mon Apr 08 16:26:19 2019 +0000
+++ b/VL53L0X.h	Wed Apr 10 19:03:16 2019 +0000
@@ -44,6 +44,37 @@
     /* Device data made accessible for further usage */
     TVL53L0X_DeviceInfo Device_Info;
 
+	/* all the fields previously hidden under DevSpecParams 
+	   of type struct VL53L0X_DeviceSpecificParameters_t   */
+    TFP1616 OscFrequencyMHz; 
+    /* Frequency used */
+    uint16_t LastEncodedTimeout;
+    /* last encoded Time out used for timing budget*/
+    TGPIO_Func GpioFunctionality;
+    /* store the functionality of the GPIO: pin0 */
+    uint32_t FinalRangeTimeoutMicroSecs;
+    /*!< Execution time of the final range*/
+    uint8_t FinalRangeVcselPPeriod;
+    /*!< Vcsel pulse period (pll clocks) for the final range measurement*/
+    uint32_t PreRangeTimeoutMicroSecs;
+    /*!< Execution time of the final range*/
+    uint8_t PreRangeVcselPPeriod;
+    /*!< Vcsel pulse period (pll clocks) for the pre-range measurement*/
+    uint16_t SigmaEstRefArray;
+    /*!< Reference array sigma value in 1/100th of [mm] e.g. 100 = 1mm */
+    uint16_t SigmaEstEffPulseWidth;
+    /*!< Effective Pulse width for sigma estimate in 1/100th of ns e.g. 900 = 9.0ns */
+    uint16_t SigmaEstEffAmbWidth;
+    /*!< Effective Ambient width for sigma estimate in 1/100th of ns e.g. 500 = 5.0ns */
+    uint8_t ModuleId; /* Module ID */
+    uint8_t Revision; /* test Revision */
+    char ProductId[VL53L0X_MAX_STRING_LENGTH]; /* Product Identifier String  */
+    uint8_t ReferenceSPADType;	/* used for ref SPAD management */
+    uint8_t RefSPADSInitialised; /* reports if ref SPADS are initialised. */
+    uint32_t PartUIDUpper; /*!< Unique Part ID Upper */
+    uint32_t PartUIDLower; /*!< Unique Part ID Lower */
+    TFP1616 SignalRateMeasFixed400mm; /*!< Peek Signal rate at 400 mm*/
+
 public: 
 	/******************************************************************************/
 	/****************** Public Initialization Methods     *************************/
@@ -107,8 +138,6 @@
      * This function will change the VL53L0X_State from VL53L0X_STATE_POWERDOWN to
      * VL53L0X_STATE_WAIT_STATICINIT.
      *
-     * @note This function accesses to the device
-     * 
      * @return  None; instead check class Field "ErrState"
      */
     void Data_init();
@@ -123,6 +152,13 @@
      *           Also check and fix errors reported Field "ErrState"   */
     void Fill_device_info();
     
+    /* api_core.h functions */
+    void Get_all_NVM_info_from_device( uint8_t option);
+
+	/* All the data that is read from the NVM and stored internally */
+    uint8_t ReadNVMDataFromDeviceDone; /* Indicate if read from device has been done (==1-4-7) or not (==0) */
+    uint8_t ReferenceSPADCount; /* used for ref SPAD management */
+
 public:
     /**
      * @brief       Start the measure indicated by operating mode
@@ -1157,9 +1193,6 @@
 
     void Check_and_load_interrupt_settings( uint8_t start_not_stopflag);
 
-    /* api_core.h functions */
-    void Get_info_from_device( uint8_t option);
-
     uint32_t Decode_timeout(uint16_t encoded_timeout);
 
     uint32_t Calc_timeout_us(uint16_t timeout_period_mclks,
@@ -1789,12 +1822,15 @@
 /******************************************************************************/
 /****************** Write and read functions from I2C *************************/
 /******************************************************************************/
+	uint32_t Get_NVM_DWord(uint8_t NVM_Address)
+	uint16_t Get_NVM_Word (uint8_t NVM_Address)
+	uint8_t  Get_NVM_Byte (uint8_t NVM_Address)
+
     /**
      * Thread safe Update (read/modify/write) single byte register
      *
      * Final_reg = (Initial_reg & and_mask) | or_mask
      *
-     * 
      * @param   index      The register index
      * @param   and_mask    8 bit and data
      * @param   or_mask     8 bit or data
@@ -1936,8 +1972,6 @@
     /*!< Ranging Data */
     VL53L0X_HistogramMeasurementData_t LastHistogramMeasure;
     /*!< Histogram Data */
-    VL53L0X_DeviceSpecificParameters_t DevSpecParams;
-    /*!< Parameters specific to the device */
     VL53L0X_SPADData_t SPADData;
     /*!< SPAD Data */
     uint8_t SequenceConfig;