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.
device Class Reference
This is the master class that integrates all the OPT3101SDK functions. More...
#include <OPT3101device.h>
Public Member Functions | |
| device () | |
| Constructor for class OPT3101::device Constructor definition for which is generated by OPT3101 configurator tool. Mainly the OPT3101::device::configurationFlags_isTXChannelActive and OPT3101::device::configurationFlags_isRegisterSetActive are set in the constructor. | |
| void | reset () |
| resets device Template function which involves hostController::resetDevice method | |
| void | initialize () |
| initializes the device Definition for the method is generated by the OPT3101 configuration generator tool. This method consists for all the register writes and sequences required to bring the device to desired operating condition | |
| bool | validateI2C () |
| validates I2C communication This methods verifies if I2C protocol is working on the host | |
| bool | validateDesignID () |
| validates if design ID is correct This methods verifies if design ID matches with what is expected from the device | |
| void | measureAndCorrectInternalCrosstalk (crosstalkC *internalXtalk) |
| Measures and corrects internal crosstalk Method abstracts the internal crosstalk measurement. There are bunch of steps and register read/writes involved to measure and correct internal crosstalk which this method handles. This method is recommended to be run every time after power-up. | |
| void | measureIllumCrosstalk (crosstalkC *illumXtalk, uint8_t txChannel, char registerSet, uint8_t shiftIllumPhase=0) |
| Measures illum crosstalk for a given channel and register set Method abstracts the illum crosstalk measurement. The measurement of illum crosstalk for a given channel and register set involves configuring the device with bunch of register writes and reads. This method abstracts the procedure to make it simple for users to adopt This calibration procedure demands a very specific target/environmental requirement. This method invokes the appropriate template method from the envController class. Users needs to implement the method which achieves the specific requirement. | |
| void | measureIllumCrosstalkSet (bool saveToFile=true) |
| Measures illum crosstalk for set of all the registers which are valid Method abstracts the illum crosstalk measurement. This measures all the cross talk values for the given set This calibration procedure demands a very specific target/environmental requirement. This method invokes the appropriate template method from the envController class. Users needs to implement the method which achieves the specific requirement. | |
| void | measurePhaseOffset (phaseOffsetC *phaseOffset, uint8_t txChannel, char registerSet, uint16_t refDistanceInCodes, uint8_t shiftIllumPhase=0) |
| Measures phase offset for a given channel and register set Method abstracts the phase offset measurement. The measurement of phase offset is for a given channel and register set involves configuring the device with bunch of register writes and reads. This method abstracts the procedure to make it simple for users to adopt This calibration procedure demands a very specific target/environmental requirement. This method invokes the appropriate template method from the envController class. Users needs to implement the method which achieves the specific requirement. | |
| void | measurePhaseOffsetSet (bool saveToFile=true) |
| Measures phase offset for a set of all registers Method abstracts the phase offset measurement. The measurement of phase offset is for a given channel and register set involves configuring the device with bunch of register writes and reads. This method abstracts the procedure to make it simple for users to adopt This calibration procedure demands a very specific target/environmental requirement. This method invokes the appropriate template method from the envController class. Users needs to implement the method which achieves the specific requirement. | |
| void | loadIllumCrosstalk (crosstalkC *illumXtalk, uint8_t txChannel, char registerSet) |
| load illum crosstalk from OPT3101::crosstalkC class to the h/w Method loads the registers from OPT3101::crosstalkC instance specified to the h/w to specified txChannel and registerSet | |
| void | loadPhaseOffset (phaseOffsetC *phaseOffset, uint8_t txChannel, char registerSet) |
| load phase offset from OPT3101::phaseOffsetC class to the h/w Method loads the registers from OPT3101::phaseOffsetC instance specified to the h/w to specified txChannel and registerSet | |
| void | manuallySetIllumCrosstalkTempCoffs () |
| Manually set the illumination cross talk coefficients after calculating outside Method to manually set illumination crosstalk temperature coefficients. | |
| void | manuallySetPhaseTempCoffs () |
| Manually set the Phase Temperature coefficients after calculating outside Method to manually Phase Temperature coefficients. | |
| void | loadIllumCrosstalkTempCoff (crosstalkTempCoffC *illumXtalkTempCoff, uint8_t txChannel, char registerSet) |
| load crosstalk temperature coefficients from OPT3101::crosstalkTempCoffC class to the h/w Method loads the registers from OPT3101::crosstalkTempCoffC instance specified to the h/w to specified txChannel and registerSet | |
| void | loadPhaseOffsetTempCoff (phaseTempCoffC *phaseTempCoff, uint8_t txChannel, char registerSet) |
| load phase offset temperature coefficients from OPT3101::phaseTempCoffC class to the h/w Method loads the registers from OPT3101::phaseTempCoffC instance specified to the h/w to specified txChannel and registerSet | |
| void | loadPhaseAmbientCoff (phaseAmbientCoffC *phaseAmbientCoff) |
| load phase ambient coefficients from OPT3101::phaseAmbientCoffC class to the h/w Method loads the registers from OPT3101::phaseAmbientCoff instance specified to the h/w | |
| void | loadIllumCrosstalkSet (bool loadFromFile=true) |
| loads all illum crosstalk set specified by OPT3101 configuration tool to h/w Method loads all the illum crosstalk registers from OPT3101::calibrationC::illumCrosstalk to the h/w to their specific TX channels and register sets. The order in which data is stored and indexed is preset and loaded accordingly. The method provides a higher level of abstraction for users to just load the illumCrosstalk calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w | |
| void | loadIllumCrosstalkTempCoffSet () |
| loads all illum crosstalk temp coefficients set specified by OPT3101 configuration tool to h/w Method loads all the illum crosstalk temp coff registers from OPT3101::calibrationC::illumCrosstalkTempCoff to the h/w to their specific TX channels and register sets. The order in which data is stored and indexed is preset and loaded accordingly. The method provides a higher level of abstraction for users to just load the illumCrosstalk temp coff calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w | |
| void | loadPhaseOffsetSet (bool loadFromFile=true) |
| loads all phase offset set specified by OPT3101 configuration tool to h/w Method loads all the phase offset registers from OPT3101::calibration::phaseOffset to the h/w to their specific TX channels and register sets. The order in which data is stored and indexed is preset and loaded accordingly. The method provides a higher level of abstraction for users to just load the phase offset calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w | |
| void | loadPhaseOffsetTempCoffSet () |
| loads all phase temp coff set specified by OPT3101 configuration tool to h/w Method loads all the phase temp coff registers from OPT3101::calibration::phaseTempCoff to the h/w to their specific TX channels and register sets. The order in which data is stored and indexed is preset and loaded accordingly. The method provides a higher level of abstraction for users to just load the phase temp coff calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w | |
| void | loadPhaseAmbientCoffSet () |
| loads phase ambient coff set to h/w Method loads all the phase ambient coff registers from OPT3101::calibrationC::phaseAmbientCoff to the h/w. The method provides a higher level of abstraction for users to just load the phase ambient coff calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w | |
| void | liveDataView (uint32_t nFrames, uint32_t refreshDelayinms, bool scroll=false) |
| shows live view scrolls data on screen param[in] nFrames; Number of Frames to display data param[in] refreshDelayinms; Refresh delay in mS param[in] scroll; Flag to determine if data needs to scrool on screen | |
| void | resetInitAndViewData (uint32_t nFrames=100, bool loadCalibration=false) |
| Initialize hardware and view data Initializes the hardware and views data param[in] nFrames; Number of Frames to display data param[in] loadCalibration; Flag to determine if calibration data needs to be loaded. | |
| void | calibrationSession_firstTimeBringUp () |
| method for calibration session run the first time the board is brought up Method is a sequence of steps recommended when the system is powered up for the first time. This this is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section | |
| void | calibrationSession_perDesignTx2IllumXtalkCorrection () |
| method for calibration of crosstalk temperature coefficients This method is only needed for implementations using TX2 channel on OPT3101. It fixes an issue where the device data stream will freeze at a certain amplitude. This method is a sequence of steps to scale xtalk down on tx2 channel of the device. This is a standalone session, which includes reset of device and initialization Details of the steps performed are documented in the detailed section | |
| void | calibrationSession_perDesignCalibrationCrosstalkTemp () |
| optional method for compensating high crosstalk levels on a single channel This procedure is needed if a single channel has much higher crosstalk than the others and allows for an additional compensation step to reduce this crosstalk to a greater degree than possible with the crosstalk correction engine on the device. Most three channel implementations will require this step if xtalk on tx2 channel is >600 codes. This this is a session, this is a standalone session includes reset of device and initialization This method also modifies registers without restoring values. Make sure to reset the device after running if other methods are to be run after. Details of the steps performed are documented in the detailed section | |
| void | calibrationSession_perDesignCalibrationPhaseTemp () |
| method for calibration of phase temperature coefficients This is recommended to be run on a few units per design. Coefficients calculated by this can be used for all the units in production Method is a sequence of steps recommended to perform phase temperature coefficients This this is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section | |
| void | calibrationSession_perDesignCalibrationPhaseAmbient () |
| method for calibration of phase ambient coefficients This is recommended to be run on a few units per design. Coefficients calculated by this can be used for all the units in production Method is a sequence of steps recommended to perform phase ambient coefficients This this is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section | |
| void | manuallySetPhaseAmbientCoffs () |
| method for calibration of phase ambient coefficients after manually curve fitting This is recommended to be run on a few units per design. Coefficients calculated by this can be used for all the units in production Method is a expected to be run after a PWL curve fit has been done to the ambient data after running OPT3101::device::calibrationSession_perDesignCalibrationPhaseAmbient and analyzing and curve fitting the data This method doesn't do anything to the device except to update the coff and store it to file Details of the steps performed are documented in the detailed section | |
| void | calibrationSession_perUnitFactoryCalibration () |
| method for calibration during factory for each unit of the system This is recommended to be run on a each and every units through production. Method is a sequence of steps recommended to perform all necessary calibration per unit This is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section | |
| void | perUnitFactoryUpdateIllumXtalk () |
| void | calibrationSession_perUnitFactoryCalibrationWriteRegisterDataToNonVolatileMemory (bool DEBUG_dry_run=false) |
| method to store the calibration to EERPOM or some other from on non-volatile memory to be loaded on power-up every time This is recommended to be run on a each and every units through production after OPT3101::device::calibrationSession_perUnitFactoryCalibration Method is a sequence of steps recommended to store the calibration data to a non-volatile memory for restoration during actual system operation In case if the configuration flag OPT3101::device::EEPROM_connected is set to true, this method uses the OPT3101 I2C slave to write data to the connected EEPROM This is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section DEBUG_dry_run argument when set to true will print registers to write, but does not actually write to the EEPROM. This is a debug feature. | |
| void | readAndPrintEEPROMContents (bool rawFormat=false) |
| Read from the EEPROM and display contents on the screen param[in] format; Chooses which format to display the data. | |
Data Fields | |
| OPT3101::registers | reg |
| Instance of the register class OPT3101::registers control for the device dev.reg.{registerName}=value initiates I2C register writes. | |
| OPT3101::calibrationC | calibration [1] |
| Instance of the calibration class OPT3101::calibrationC. This instance acts a staging area to load, save and calculate calibration coefficients during initial bring up, debug and factory calibration steps. | |
| bool | configurationFlags_monoshotMode |
| Configuration flag to specify if the device is operating in mono shot mode which is set by OPT3101 configurator tool. | |
| uint8_t | configurationFlags_xtalkFilterTau |
| Configuration value of crosstalk filter time constant which is set by OPT3101 configurator tool. | |
| uint16_t | configurationFlags_xtalkSettlingOneTauInMilliSeconds |
| Configuration value specifying the time constant in milliseconds which is set by OPT3101 configurator tool. | |
| uint16_t | configurationFlags_xtalkSettlingOneTauInDataReadyCounts |
| Configuration value specifying the time constant in data ready counts which is set by OPT3101 configurator tool. | |
| uint8_t | configurationFlags_avgFrameCountExponentOfTwo |
| Configuration value specifying exponent component of average frame count which is set by OPT3101 configurator tool. | |
| uint32_t | configurationFlags_frameTimeInMilliSeconds |
| Configuration value specifying frame time in milli-seconds which is set by OPT3101 configurator tool. | |
| bool | configurationFlags_isTXChannelActive [3] |
| Configuration value specifying the active channels set by OPT3101 congifigurator tool. | |
| bool | configurationFlags_isRegisterSetActive [2] |
| Configuration value specifying the active register set by OPT3101 congifigurator tool. | |
Detailed Description
This is the master class that integrates all the OPT3101SDK functions.
OPT3101::device is at the apex of the OPT3101SDK providing all the methods and functionality required for a full system bring up calibration and debug
The register control for the device, calibration routines are instantiated in this call for user assess.
Definition at line 53 of file OPT3101device.h.
Constructor & Destructor Documentation
| device | ( | void | ) |
Constructor for class OPT3101::device Constructor definition for which is generated by OPT3101 configurator tool. Mainly the OPT3101::device::configurationFlags_isTXChannelActive and OPT3101::device::configurationFlags_isRegisterSetActive are set in the constructor.
- Returns:
- Nothing;
Definition at line 120 of file OPT3101_configuration.cpp.
Member Function Documentation
| void calibrationSession_firstTimeBringUp | ( | ) |
method for calibration session run the first time the board is brought up Method is a sequence of steps recommended when the system is powered up for the first time. This this is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section
- Returns:
- Nothing;
Algorithm of the method is as follows
* Resets the device calling OPT3101::device::reset method
* Initializes the OPT3101 device by calling OPT3101::device::initialize method
* Calls method OPT3101::device::measureAndCorrectInternalCrosstalk with argument OPT3101::calibrationC::internalCrosstalk
* Calls the method OPT3101::crosstalkC::report for debug and data analysis
* Calls the method OPT3101::crosstalkC::report for debug and data analysis
Definition at line 30 of file OPT3101_Calibration.cpp.
| void calibrationSession_perDesignCalibrationCrosstalkTemp | ( | ) |
optional method for compensating high crosstalk levels on a single channel This procedure is needed if a single channel has much higher crosstalk than the others and allows for an additional compensation step to reduce this crosstalk to a greater degree than possible with the crosstalk correction engine on the device. Most three channel implementations will require this step if xtalk on tx2 channel is >600 codes. This this is a session, this is a standalone session includes reset of device and initialization This method also modifies registers without restoring values. Make sure to reset the device after running if other methods are to be run after. Details of the steps performed are documented in the detailed section
- Returns:
- Nothing;
Algorithm of the method is as follows
* Declares temporary variable of OPT3101::crosstalkC class to hold internal crosstalk data across temperature, TX channel and register settings
* Resets the device calling OPT3101::device::reset method
* Initializes the OPT3101 device by calling OPT3101::device::initialize method
* Calls method OPT3101::device::measureAndCorrectInternalCrosstalk with argument OPT3101::calibrationC::internalCrosstalk
* Calls the method environmentalController::setTargetToInfinity_OR_coverPhotodiode , which is expected to set the environment so as to be able to measure illumination crosstalk
* Calls the method environmentalController::setChamberTemperature , which is expected to set the chamber to desired temperature
* Loops through total number of points to be data printed
* Loops though all the valid TX channel and register set configurations
* Calls method OPT3101::device::measureIllumCrosstalk with temporary variable of OPT3101::crosstalkC class
* Calls OPT3101::crosstalkC::report method to report the crosstalk on screen
Definition at line 237 of file OPT3101_Calibration.cpp.
| void calibrationSession_perDesignCalibrationPhaseAmbient | ( | ) |
method for calibration of phase ambient coefficients This is recommended to be run on a few units per design. Coefficients calculated by this can be used for all the units in production Method is a sequence of steps recommended to perform phase ambient coefficients This this is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section
- Returns:
- Nothing;
Algorithm of the method is as follows
* Declares temporary variable of OPT3101::phaseOffsetC class to hold phase offset data across temperature, TX channel and register settings
Algorithm of the method is as follows
* Resets the device calling OPT3101::device::reset method
* Initializes the OPT3101 device by calling OPT3101::device::initialize method
* Calls method OPT3101::device::measureAndCorrectInternalCrosstalk with argument OPT3101::calibrationC::internalCrosstalk
* Loops though all the valid TX channel and register set configurations
* Warning User is expected to select and set reference distance so that the amplitude of the system for this particular TX and register set configurations measures between 16K and 24K. Default is set to 0 in the SDK
* Calls environmentalController::setTargetDistance method with the specified distance
* Calls the method environmentalController::setChamberTemperature , which is expected to set the chamber to desired temperature
* Converts the reference distance specified in codes related to OPT3101::frameData::phase ADC codes
* Loops through chamber temperature settings to get temp coff
* Since Phase ambient coff is required to be done only for one TX configuration the the method breaks from the loop after 1 ambient sweep
Definition at line 309 of file OPT3101_Calibration.cpp.
| void calibrationSession_perDesignCalibrationPhaseTemp | ( | ) |
method for calibration of phase temperature coefficients This is recommended to be run on a few units per design. Coefficients calculated by this can be used for all the units in production Method is a sequence of steps recommended to perform phase temperature coefficients This this is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section
- Returns:
- Nothing;
Algorithm of the method is as follows
* Declares temporary variable of OPT3101::phaseOffsetC class to hold phase offset data across temperature, TX channel and register settings
* Resets the device calling OPT3101::device::reset method
* Initializes the OPT3101 device by calling OPT3101::device::initialize method
* Calls method OPT3101::device::measureAndCorrectInternalCrosstalk with argument OPT3101::calibrationC::internalCrosstalk
* Loops though all the valid TX channel and register set configurations
* Warning User is expected to select and set reference distance so that the amplitude of the system for this particular TX and register set configurations measures between 16K and 24K. Default is set to 0 in the SDK
* Calls environmentalController::setTargetDistance method with the specified distance
* Calls the method environmentalController::setChamberTemperature , which is expected to set the chamber to desired temperature
* Converts the reference distance specified in codes related to OPT3101::frameData::phase ADC codes
* Loops through chamber temperature settings to get temp coff
Definition at line 267 of file OPT3101_Calibration.cpp.
| void calibrationSession_perDesignTx2IllumXtalkCorrection | ( | ) |
method for calibration of crosstalk temperature coefficients This method is only needed for implementations using TX2 channel on OPT3101. It fixes an issue where the device data stream will freeze at a certain amplitude. This method is a sequence of steps to scale xtalk down on tx2 channel of the device. This is a standalone session, which includes reset of device and initialization Details of the steps performed are documented in the detailed section
- Returns:
- Nothing;
Algorithm of the method is as follows
* Resets the device calling OPT3101::device::reset method
* Initializes the OPT3101 device by calling OPT3101::device::initialize method
* Ensure all calibrations are zeroed.
* print header for data table
* print baseline original xtalk
* Calls method OPT3101::device::measureIllumCrosstalk with temporary variable of OPT3101::crosstalkC class
* enable current on tx2
* loop through all currents and print rest of the data as shown below
* set current on tx2
* print current
* Calls method OPT3101::device::measureIllumCrosstalk with temporary variable of OPT3101::crosstalkC class
* Calls OPT3101::crosstalkC::report method to report the crosstalk on screen
Definition at line 190 of file OPT3101_Calibration.cpp.
| void calibrationSession_perUnitFactoryCalibration | ( | ) |
method for calibration during factory for each unit of the system This is recommended to be run on a each and every units through production. Method is a sequence of steps recommended to perform all necessary calibration per unit This is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section
- Returns:
- Nothing;
* Resets the device calling OPT3101::device::reset method
* Initializes the OPT3101 device by calling OPT3101::device::initialize method
* Calls method OPT3101::device::measureAndCorrectInternalCrosstalk with argument OPT3101::calibrationC::internalCrosstalk
* Calls the method OPT3101::crosstalkC::report for debug and data analysis
* Calls the OPT3101::device::loadIllumCrosstalkSet with false argument so that method to load all illum crosstalk settings from the OPT3101::device::crosstalk::illumCrosstalk member
* Calls the OPT3101::device::loadPhaseOffsetSet method with false argument so as to load all the phase offset registers from the OPT3101::device::calibration::phaseOffset instance instead of files
* Calls the OPT3101::device::loadPhaseAmbientCoffSet method to load all the phase offset temp coff
* Calls the OPT3101::device::calibrationSession_perUnitFactoryCalibrationWriteRegisterDataToNonVolatileMemory to store the calibration data to a non-volatile memory
Definition at line 369 of file OPT3101_Calibration.cpp.
| void calibrationSession_perUnitFactoryCalibrationWriteRegisterDataToNonVolatileMemory | ( | bool | DEBUG_dry_run = false ) |
method to store the calibration to EERPOM or some other from on non-volatile memory to be loaded on power-up every time This is recommended to be run on a each and every units through production after OPT3101::device::calibrationSession_perUnitFactoryCalibration Method is a sequence of steps recommended to store the calibration data to a non-volatile memory for restoration during actual system operation In case if the configuration flag OPT3101::device::EEPROM_connected is set to true, this method uses the OPT3101 I2C slave to write data to the connected EEPROM This is a session, this is a standalone session includes reset of device and initialization Details of the steps performed are documented in the detailed section DEBUG_dry_run argument when set to true will print registers to write, but does not actually write to the EEPROM. This is a debug feature.
- Returns:
- Nothing;
Algorithm of the method is as follows
* Method returns without doing any operation when the device configuration flag OPT3101::device::EEPROM_connected is false. User needs to implement their own function if no EEPROM is present
* Critical registers which are modified in this method are read from the h/w and temporarily bufferd to local variables.
* OPT3101 device is configured to write desired data though the SDA_M/SCL_M lines to the connected external EEPROM
* Erases the EEPROM with 0xFF data in all lcoations.
* Reads all the registers from the list OPT3101::calibrationC::registerAddressList from h/w and writes the address and data to the connected external EEPROM
* Restores the device state to the same state as before entering this method from the buffered local variables
Definition at line 49 of file OPT3101_Calibration.cpp.
| void initialize | ( | void | ) |
initializes the device Definition for the method is generated by the OPT3101 configuration generator tool. This method consists for all the register writes and sequences required to bring the device to desired operating condition
- Returns:
- Nothing;
Definition at line 52 of file OPT3101_configuration.cpp.
| void liveDataView | ( | uint32_t | nFrames, |
| uint32_t | refreshDelayinms, | ||
| bool | scroll = false |
||
| ) |
shows live view scrolls data on screen param[in] nFrames; Number of Frames to display data param[in] refreshDelayinms; Refresh delay in mS param[in] scroll; Flag to determine if data needs to scrool on screen
- Returns:
- Nothing;
Definition at line 38 of file OPT3101device_Functions.cpp.
| void loadIllumCrosstalk | ( | OPT3101::crosstalkC * | illumXtalk, |
| uint8_t | txChannel, | ||
| char | registerSet | ||
| ) |
load illum crosstalk from OPT3101::crosstalkC class to the h/w Method loads the registers from OPT3101::crosstalkC instance specified to the h/w to specified txChannel and registerSet
- Parameters:
-
[out] illumXtalk; illumXtalk is pointer to the instance of OPT3101::crosstalkC class. The register values form the instance are loaded to the hardware to specified txChannel and registerSet [in] txChannel; txChannel is the number denoting the channel to which the registers need to be loaded For eg: illumXtalk=0 loads for TX0 channel [in] registerSet; registerSet is a char 'h' or 'l' specifying register set on which register needs to be loaded. For eg: registerSet='h' would load on to registers related to illum_dac_h_tx*
- Returns:
- Nothing;
Algorithm of the method is as follows
* Load the common to all TX channels/register set registers (like for eg OPT3101::registers::illum_xtalk_reg_scale) to the h/w from the method input argument illumXtalk
* Based on txChannel and registerSet argument the the method loads the OPT3101::crosstalkC::I, OPT3101::crosstalkC::Q, OPT3101::crosstalkC::tmain and OPT3101::crosstalkC::tillum to device h/w specified TX channels and register set
* for eg: then txChannel=1 and registerSet='l' then the method loads the argument illumXtalk's OPT3101::crosstalkC::I to OPT3101::registers::iphase_xtalk_reg_hdr0_tx1 . Similarly the qphase_reg* registers, OPT3101::registers::tmain_calib_hdr0_tx1 and OPT3101::registers::tillum_calib_hdr0_tx1 are loaded from the input argument illumXtalk's OPT3101::crosstalkC::tmain and OPT3101::crosstalkC::tillum
Definition at line 348 of file OPT3101device_Functions.cpp.
| void loadIllumCrosstalkSet | ( | bool | loadFromFile = true ) |
loads all illum crosstalk set specified by OPT3101 configuration tool to h/w Method loads all the illum crosstalk registers from OPT3101::calibrationC::illumCrosstalk to the h/w to their specific TX channels and register sets. The order in which data is stored and indexed is preset and loaded accordingly. The method provides a higher level of abstraction for users to just load the illumCrosstalk calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w
- Parameters:
-
[in] loadFromFile; loadFromFile is a flag which specifies whether to load the calibration coff from file or from the OPT3101::device::calibration member of the OPT3101::calibrationC class
- Returns:
- Nothing;
Algorithm of the method is as follows
* Checks if input argument loadFromFile is true. If true proceeds to load files in to OPT3101::device::calibration
* Loops though all the valid TX channel and register set configurations
* Calls method OPT3101::crosstalkC::loadFromFile to load data from non-volatile memory to all the OPT3101::device::calibration::illumCrosstalk members
* Finds common crosstalk scale for the illum Crosstalk values captured in OPT3101::device::calibrationC using method OPT3101::calibrationC::findCommonCrosstalkScale
* Loops though all the valid TX channel and register set configurations
* Loads all the illum crosstalk corresponding to TX and register set configurations to the device from the OPT3101::device::calibrationC::illumCrosstalk member by calling OPT3101::device::loadIllumCrosstalk
Definition at line 1026 of file OPT3101device_Functions.cpp.
| void loadIllumCrosstalkTempCoff | ( | OPT3101::crosstalkTempCoffC * | illumXtalkTempCoff, |
| uint8_t | txChannel, | ||
| char | registerSet | ||
| ) |
load crosstalk temperature coefficients from OPT3101::crosstalkTempCoffC class to the h/w Method loads the registers from OPT3101::crosstalkTempCoffC instance specified to the h/w to specified txChannel and registerSet
- Parameters:
-
[in] illumXtalkTempCoff; illumXtalkTempCoff is pointer to the instance of OPT3101::crosstalkTempCoffC class. The register values form the instance are loaded to the hardware to specified txChannel and registerSet [in] txChannel; txChannel is the number denoting the channel to which the registers need to be loaded For eg: illumXtalk=0 loads for TX0 channel [in] registerSet; registerSet is a char 'h' or 'l' specifying register set on which register needs to be loaded. For eg: registerSet='h' would load on to registers related to illum_dac_h_tx*
- Returns:
- Nothing;
Algorithm of the method is as follows
* loads common scale OPT3101::crosstalkTempCoffC::commonScale from input argument illumXtalkTempCoff to device register OPT3101::registers::scale_temp_coeff_xtalk
* Based on txChannel and registerSet argument the method loads the OPT3101::crosstalkTempCoffC::coffIReg and OPT3101::crosstalkTempCoffC::coffQReg to respective register set and channel registers
* for eg: then txChannel=1 and registerSet='l' then the method loads the argument illumXtalkTempCoff's OPT3101::crosstalkTempCoffC::coffIReg to OPT3101::registers::temp_coeff_xtalk_iphase_hdr0_tx1 and similarly for the qphase register as well
Definition at line 454 of file OPT3101device_Functions.cpp.
| void loadIllumCrosstalkTempCoffSet | ( | ) |
loads all illum crosstalk temp coefficients set specified by OPT3101 configuration tool to h/w Method loads all the illum crosstalk temp coff registers from OPT3101::calibrationC::illumCrosstalkTempCoff to the h/w to their specific TX channels and register sets. The order in which data is stored and indexed is preset and loaded accordingly. The method provides a higher level of abstraction for users to just load the illumCrosstalk temp coff calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w
- Returns:
- Nothing;
* Calls OPT3101::device::loadIllumCrosstalkSet with the same loafFromFile flag specified to this method
* Calls OPT3101::calibrationC::findCrosstalkTempRegisterValues based on the members from OPT3101::calibrationC class OPT3101::calibrationC::illumCrosstalkTempCoff and OPT3101::calibrationC::illumCrosstalk
* Loops though all the valid TX channel and register set configurations
* Calls the method OPT3101::device::loadIllumCrosstalkTempCoff to load all the crosstalk temp coff values from the OPT3101::calibrationC::illumCrosstalkTempCoff member
Definition at line 1122 of file OPT3101device_Functions.cpp.
| void loadPhaseAmbientCoff | ( | OPT3101::phaseAmbientCoffC * | phaseAmbientCoff ) |
load phase ambient coefficients from OPT3101::phaseAmbientCoffC class to the h/w Method loads the registers from OPT3101::phaseAmbientCoff instance specified to the h/w
- Parameters:
-
[in] phaseAmbientCoff; phaseAmbientCoff is pointer to the instance of OPT3101::phaseAmbientCoffC class. The register values form the instance are loaded to the hardware
- Returns:
- Nothing;
Algorithm of the method is as follows
* Assigns all the register entries from phaseAmbientCoff OPT3101::phaseAmbientCoffC to h/w registers
* for eg: input argument phaseAmbientCoff's OPT3101::phaseAmbientCoffC::coffReg is loaded to OPT3101::registers::amb_phase_corr_pwl_coeff0 and other related registers
Definition at line 550 of file OPT3101device_Functions.cpp.
| void loadPhaseAmbientCoffSet | ( | ) |
loads phase ambient coff set to h/w Method loads all the phase ambient coff registers from OPT3101::calibrationC::phaseAmbientCoff to the h/w. The method provides a higher level of abstraction for users to just load the phase ambient coff calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w
- Returns:
- Nothing;
* Calculates the phase ambient coff by calling method OPT3101::phaseAmbientCoffC::calculateCoff also passing argument of device register OPT3101::registers::freq_count_read_reg
* Calls method OPT3101::device::loadPhaseAmbientCoff to load ambient coff to device from OPT3101::calibrationC::phaseAmbientCoff member
Definition at line 1158 of file OPT3101device_Functions.cpp.
| void loadPhaseOffset | ( | OPT3101::phaseOffsetC * | phaseOffset, |
| uint8_t | txChannel, | ||
| char | registerSet | ||
| ) |
load phase offset from OPT3101::phaseOffsetC class to the h/w Method loads the registers from OPT3101::phaseOffsetC instance specified to the h/w to specified txChannel and registerSet
- Parameters:
-
[in] phaseOffset; phaseOffset is pointer to the instance of OPT3101::phaseOffsetC class. The register values form the instance are loaded to the hardware to specified txChannel and registerSet [in] txChannel; txChannel is the number denoting the channel to which the registers need to be loaded For eg: illumXtalk=0 loads for TX0 channel [in] registerSet; registerSet is a char 'h' or 'l' specifying register set on which register needs to be loaded. For eg: registerSet='h' would load on to registers related to illum_dac_h_tx*
- Returns:
- Nothing;
Algorithm of the method is as follows
* Enables the phase offset correction register OPT3101::registers::en_phase_corr
* Based on txChannel and registerSet argument the the method loads the OPT3101::phaseOffsetC::phaseOffset, OPT3101::phaseOffsetC::frameData::tmain and OPT3101::phaseOffsetC::frameData::tillum to device h/w specified TX channels and register set
* for eg: then txChannel=1 and registerSet='l' then the method loads the argument phaseOffset's OPT3101::phaseOffsetC::phaseOffset to OPT3101::registers::phase_offset_hdr0_tx1 OPT3101::registers::tmain_calib_hdr0_tx1 and OPT3101::registers::tillum_calib_hdr0_tx1 are loaded from the input argument phaseOffset's OPT3101::phaseOffsetC::frameData::tmain and OPT3101::phaseOffsetC::frameData::tillum
Definition at line 406 of file OPT3101device_Functions.cpp.
| void loadPhaseOffsetSet | ( | bool | loadFromFile = true ) |
loads all phase offset set specified by OPT3101 configuration tool to h/w Method loads all the phase offset registers from OPT3101::calibration::phaseOffset to the h/w to their specific TX channels and register sets. The order in which data is stored and indexed is preset and loaded accordingly. The method provides a higher level of abstraction for users to just load the phase offset calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w
- Parameters:
-
[in] loadFromFile; loadFromFile is a flag which specifies whether to load the calibration coff from file or from the OPT3101::device::calibration member of the OPT3101::calibrationC class
- Returns:
- Nothing;
Algorithm of the method is as follows
* Loops though all the valid TX channel and register set configurations
* Creates filename illumCrosstalk_TX{channel}_{h/l}.txt in path filePath
* Calls method OPT3101::crosstalkC::loadFromFile to store the data
* Loops though all the valid TX channel and register set configurations
* Loads all the phase offset corresponding to TX and register set configurations to the device from the OPT3101::device::calibrationC::phaseOffset member by calling OPT3101::device::loadPhaseOffset
Definition at line 1073 of file OPT3101device_Functions.cpp.
| void loadPhaseOffsetTempCoff | ( | OPT3101::phaseTempCoffC * | phaseTempCoff, |
| uint8_t | txChannel, | ||
| char | registerSet | ||
| ) |
load phase offset temperature coefficients from OPT3101::phaseTempCoffC class to the h/w Method loads the registers from OPT3101::phaseTempCoffC instance specified to the h/w to specified txChannel and registerSet
- Parameters:
-
[in] phaseTempCoff; phaseTempCoff is pointer to the instance of OPT3101::phaseTempCoffC class. The register values form the instance are loaded to the hardware to specified txChannel and registerSet [in] txChannel; txChannel is the number denoting the channel to which the registers need to be loaded For eg: illumXtalk=0 loads for TX0 channel [in] registerSet; registerSet is a char 'h' or 'l' specifying register set on which register needs to be loaded. For eg: registerSet='h' would load on to registers related to illum_dac_h_tx*
- Returns:
- Nothing;
Algorithm of the method is as follows
* Enables the phase temp coefficient register OPT3101::registers::en_temp_corr
* Sets the common scale register OPT3101::registers::scale_phase_temp_coeff with value from input argument phaseTempCoff's OPT3101::phaseTempCoffC::commonScale
* Based on txChannel and registerSet argument the method loads the OPT3101::phaseTempCoffC::coffReg to respective register set and channel registers
* for eg: then txChannel=1 and registerSet='l' then the method loads the argument phaseTempCoff's OPT3101::phaseTempCoffC::coffReg to OPT3101::registers::temp_coeff_illum_hdr0_tx1 or OPT3101::registers::temp_coeff_main_hdr0_tx1 depending on if phaseTempCoff's OPT3101::phaseTempCoffC::istMainCoff is True or False
Definition at line 496 of file OPT3101device_Functions.cpp.
| void loadPhaseOffsetTempCoffSet | ( | ) |
loads all phase temp coff set specified by OPT3101 configuration tool to h/w Method loads all the phase temp coff registers from OPT3101::calibration::phaseTempCoff to the h/w to their specific TX channels and register sets. The order in which data is stored and indexed is preset and loaded accordingly. The method provides a higher level of abstraction for users to just load the phase temp coff calibration portion of the calibration data from the self contained instance of OPT3101::calibrationC to the h/w
- Parameters:
-
[in] loadFromFile; loadFromFile is a flag which specifies whether to load the calibration coff from file or from the OPT3101::device::calibration member of the OPT3101::calibrationC class
- Returns:
- Nothing;
* Calls OPT3101::calibrationC::findPhaseTempRegisterValues based on the members from OPT3101::calibrationC class OPT3101::calibrationC::phaseTempCoff and current device register OPT3101::registers::freq_count_read_reg
* Loops though all the valid TX channel and register set configurations
* Calls the method OPT3101::device::loadPhaseOffsetTempCoff to load all the phase temp coff values from the OPT3101::calibrationC::phaseTempCoff member
Definition at line 1141 of file OPT3101device_Functions.cpp.
| void manuallySetIllumCrosstalkTempCoffs | ( | ) |
Manually set the illumination cross talk coefficients after calculating outside Method to manually set illumination crosstalk temperature coefficients.
- Returns:
- Nothing;
* Units for coefficient: ScaledIorQ/tempRegister/MagnitudeCalc
Definition at line 30 of file OPT3101Coefficients.cpp.
| void manuallySetPhaseAmbientCoffs | ( | ) |
method for calibration of phase ambient coefficients after manually curve fitting This is recommended to be run on a few units per design. Coefficients calculated by this can be used for all the units in production Method is a expected to be run after a PWL curve fit has been done to the ambient data after running OPT3101::device::calibrationSession_perDesignCalibrationPhaseAmbient and analyzing and curve fitting the data This method doesn't do anything to the device except to update the coff and store it to file Details of the steps performed are documented in the detailed section
- Returns:
- Nothing;
* Warning: User is expected to curve fit the phase ambient data with PWL curve fit and provide the floating point precision coefficients and split points
* Users is expected to enter all the OPT3101::calibration::phaseAmbientCoff::coff values manually after computation outside based on data generated by OPT3101::device::calibrationSession_perDesignCalibrationPhaseAmbient
* Users is expected to enter all the OPT3101::calibration::phaseAmbientCoff::splitsReg values manually after computation outside based on data generated by OPT3101::device::calibrationSession_perDesignCalibrationPhaseAmbient
Definition at line 72 of file OPT3101Coefficients.cpp.
| void manuallySetPhaseTempCoffs | ( | ) |
Manually set the Phase Temperature coefficients after calculating outside Method to manually Phase Temperature coefficients.
- Returns:
- Nothing;
* Units for coefficient: Phase/tempRegister
Definition at line 56 of file OPT3101Coefficients.cpp.
| void measureAndCorrectInternalCrosstalk | ( | OPT3101::crosstalkC * | internalXtalk ) |
Measures and corrects internal crosstalk Method abstracts the internal crosstalk measurement. There are bunch of steps and register read/writes involved to measure and correct internal crosstalk which this method handles. This method is recommended to be run every time after power-up.
- Parameters:
-
[out] internalXtalk; internalXtalk in pointer to the instance of class OPT3101::crosstalkC where the internal crosstalk values gets loaded. This is used to understand and analyze system performance.
- Returns:
- Nothing;
Algorithm of the method is as follows
* Critical registers which are modified in this method are read from the h/w and temporarily buffered to local variables.
* Temporarily buffered register states are restored to the h/w with register writes while exiting this method.
* Enables internal crosstalk measure and correct register OPT3101::registers::int_xtalk_calib
* Sleeps the host for 8 times the OPT3101::device::configurationFlags_xtalkSettlingOneTauInMilliSeconds so that device settles
* Sleep delay can be replaced with wait for 8 times the OPT3101::device::configurationFlags_xtalkSettlingOneTauInDataReadyCounts data ready pulses.User needs to implement based on host configuration
* Disables internal crosstalk measure register OPT3101::registers::int_xtalk_calib to complete internal crosstalk measurement
* Reads the internal crosstalk registers OPT3101::registers::iphase_xtalk and OPT3101::registers::qphase_xtalk and assigns to internalXtalk input instance pointer of type OPT3101::crosstalkC class
* Restores the device state to the same state as before entering this method from the buffered local variables
Definition at line 162 of file OPT3101device_Functions.cpp.
| void measureIllumCrosstalk | ( | OPT3101::crosstalkC * | illumXtalk, |
| uint8_t | txChannel, | ||
| char | registerSet, | ||
| uint8_t | shiftIllumPhase = 0 |
||
| ) |
Measures illum crosstalk for a given channel and register set Method abstracts the illum crosstalk measurement. The measurement of illum crosstalk for a given channel and register set involves configuring the device with bunch of register writes and reads. This method abstracts the procedure to make it simple for users to adopt
This calibration procedure demands a very specific target/environmental requirement. This method invokes the appropriate template method from the envController class. Users needs to implement the method which achieves the specific requirement.
- Parameters:
-
[out] illumXtalk; illumXtalk in pointer to the instance of class OPT3101::crosstalkC where the illum crosstalk values gets loaded. This is used to understand and analyze system performance besides being used for temp coff estimation and factory calibration. [in] txChannel; txChannel is the number denoting the channel for which the crosstalk measurement has to be performed. For eg: illumXtalk=0 does measurement for TX0 channel [in] registerSet; registerSet is a char 'h' or 'l' specifying register set on which the illum crosstalk measurement needs to be performed. For eg: registerSet='h' would perform measurement on registers related to illum_dac_h_tx* [in] shiftIllumPhase; shiftIllumPhase is the register value to set the OPT3101::registers::shift_illum_phase. This modifies the relative phase between the TX channels and the AFE helping perform non-linear calibration without moving the target.
- Returns:
- Nothing;
Algorithm of the method is as follows
* Critical registers which are modified in this method are read from the h/w and temporarily buffered to local variables.
* Register set is chosen based on registerSet input to this method by setting OPT3101::registers::sel_hdr_mode
* TX channel is chosen based on txChannel input to this method by setting OPT3101::registers::sel_tx_ch
* Sets up the OPT3101::registers::shift_illum_phase based on the input to this method shiftIllumPhase
* Measures illum crosstalk from registers OPT3101::registers::iphase_xtalk , and OPT3101::registers::qphase_xtalk and assigns to illumXtalk instance pointer of type OPT3101::crosstalkC class
* Takes snapshot of device TX register configuration and assign them to illumXtalk instance pointer of type OPT3101::crosstalkC class
* Restores the device state to the same state as before entering this method from the buffered local variables
Definition at line 271 of file OPT3101device_Functions.cpp.
| void measureIllumCrosstalkSet | ( | bool | saveToFile = true ) |
Measures illum crosstalk for set of all the registers which are valid Method abstracts the illum crosstalk measurement. This measures all the cross talk values for the given set
This calibration procedure demands a very specific target/environmental requirement. This method invokes the appropriate template method from the envController class. Users needs to implement the method which achieves the specific requirement.
- Returns:
- Nothing;
* Calls the method environmentalController::setTargetToInfinity_OR_coverPhotodiode , which is expected to set the environment so as to be able to measure illumination crosstalk
* Loops though all the valid TX channel and register set configurations
* Calls method OPT3101::device::measureIllumCrosstalk with argument OPT3101::calibrationC::illumCrosstalk
* Calls the method OPT3101::crosstalkC::report for debug and data analysis
* Calls the method OPT3101::crosstalkC::report for debug and data analysis
* Creates filename illumCrosstalk_TX{channel}_{h/l}.txt in path filePath
* Calls method OPT3101::crosstalkC::storeToFile to store the data
Definition at line 228 of file OPT3101device_Functions.cpp.
| void measurePhaseOffset | ( | OPT3101::phaseOffsetC * | phaseOffset, |
| uint8_t | txChannel, | ||
| char | registerSet, | ||
| uint16_t | refDistanceInCodes, | ||
| uint8_t | shiftIllumPhase = 0 |
||
| ) |
Measures phase offset for a given channel and register set Method abstracts the phase offset measurement. The measurement of phase offset is for a given channel and register set involves configuring the device with bunch of register writes and reads. This method abstracts the procedure to make it simple for users to adopt
This calibration procedure demands a very specific target/environmental requirement. This method invokes the appropriate template method from the envController class. Users needs to implement the method which achieves the specific requirement.
- Parameters:
-
[out] phaseOffset; phaseOffset in pointer to the instance of class OPT3101::phaseOffsetC where the phase offset values gets loaded. This is used to understand and analyze system performance besides being used for temp coff estimation and factory calibration. [in] txChannel; txChannel is the number denoting the channel for which the measurement has to be performed. For eg: illumXtalk=0 does measurement for TX0 channel [in] registerSet; registerSet is a char 'h' or 'l' specifying register set on which the measurement needs to be performed. For eg: registerSet='h' would perform measurement on registers related to illum_dac_h_tx* [in] refDistanceInCodes; refDistanceInCodes is reference distance of the target specified in codes OPT3101::frameData::phase codes. The conversion for the distance in mm to codes documented in the method OPT3101::device::calibrationSession_perDesignCalibrationPhaseTemp [in] shiftIllumPhase; shiftIllumPhase is the register value to set the OPT3101::registers::shift_illum_phase. This modifies the relative phase between the TX channels and the AFE helping perform non-linear calibration without moving the target.
- Returns:
- Nothing;
Algorithm of the method is as follows
* Critical registers which are modified in this method are read from the h/w and temporarily buffered to local variables.
* Register set is chosen based on registerSet input to this method by setting OPT3101::registers::sel_hdr_mode
* TX channel is chosen based on txChannel input to this method by setting OPT3101::registers::sel_tx_ch
* Sets up the OPT3101::registers::shift_illum_phase based on the input to this method shiftIllumPhase
* Measures phase offset with following steps
* Calculates number of frames to average the data. Based on the OPT3101::device::configurationFlags_avgFrameCountExponentOfTwo number of average is decided. More frames are captured and averaged if device configuration has low average frames and vice versa
* Captures all calculated number of frames from the h/w using OPT3101::frameData::capture method
* Measures the mean of the captured frames OPT3101::frameData::populateWithMean method
* Calculates the actual phase offset register value based on the input argument refDistanceInCodes and measured phase OPT3101::frameData::phase (mean over captured frames)
* Captures snapshot of register value OPT3101::registers::freq_count_read_reg and assigns to input argument phaseOffset's OPT3101::phaseOffsetC::freqCount
* Scales phase offset value with OPT3101::phaseOffsetC::freqCount value
* Assigns input argument phaseOffset's OPT3101::phaseOffsetC::phaseOffset with scaled register value
* Captures the calculated mean OPT3101::frameData to OPT3101::phaseOffsetC::data
* Captures the snapshot of input argument refDistanceInCodes to the input argument phaseOffset's OPT3101::phaseOffsetC::referenceDistanceInCodes
* Captures the snapshot of the illum dac, illum DC and illum scale settings form h/w to the phaseOffset input argument
* Restores the device state to the same state as before entering this method from the buffered local variables
Definition at line 896 of file OPT3101device_Functions.cpp.
| void measurePhaseOffsetSet | ( | bool | saveToFile = true ) |
Measures phase offset for a set of all registers Method abstracts the phase offset measurement. The measurement of phase offset is for a given channel and register set involves configuring the device with bunch of register writes and reads. This method abstracts the procedure to make it simple for users to adopt
This calibration procedure demands a very specific target/environmental requirement. This method invokes the appropriate template method from the envController class. Users needs to implement the method which achieves the specific requirement.
- Returns:
- Nothing;
* Loops though all the valid TX channel and register set configurations
* Calls environmentalController::setTargetDistance method with the specified distance
* Converts the reference distance specified in codes related to OPT3101::frameData::phase ADC codes
* Measures phase offset by calling method OPT3101::device::measurePhaseOffset with specified reference distance and OPT3101::calibrationC::phaseOffset as argument to store the phase offset values
* Creates filename illumCrosstalk_TX{channel}_{h/l}.txt in path filePath
* Calls method OPT3101::crosstalkC::storeToFile to store the data
Definition at line 826 of file OPT3101device_Functions.cpp.
| void perUnitFactoryUpdateIllumXtalk | ( | ) |
* Resets the device calling OPT3101::device::reset method
* Initializes the OPT3101 device by calling OPT3101::device::initialize method
* Calls method OPT3101::device::measureAndCorrectInternalCrosstalk with argument OPT3101::calibrationC::internalCrosstalk
* Calls the method OPT3101::crosstalkC::report for debug and data analysis
* Calls the OPT3101::device::loadIllumCrosstalkSet with false argument so that method to load all illum crosstalk settings from the OPT3101::device::crosstalk::illumCrosstalk member
* Calls the OPT3101::device::calibrationSession_perUnitFactoryCalibrationWriteRegisterDataToNonVolatileMemory to store the calibration data to a non-volatile memory
Definition at line 397 of file OPT3101_Calibration.cpp.
| void readAndPrintEEPROMContents | ( | bool | rawFormat = false ) |
Read from the EEPROM and display contents on the screen param[in] format; Chooses which format to display the data.
- Returns:
- Nothing;
Definition at line 131 of file OPT3101_Calibration.cpp.
| void reset | ( | ) |
resets device Template function which involves hostController::resetDevice method
- Returns:
- Nothing;
Algorithm of the method is as follows
* Invokes the hostController::reset method
Definition at line 30 of file OPT3101device_Functions.cpp.
| void resetInitAndViewData | ( | uint32_t | nFrames = 100, |
| bool | loadCalibration = false |
||
| ) |
Initialize hardware and view data Initializes the hardware and views data param[in] nFrames; Number of Frames to display data param[in] loadCalibration; Flag to determine if calibration data needs to be loaded.
- Returns:
- Nothing;
* Calls method OPT3101::device::measureAndCorrectInternalCrosstalk with argument OPT3101::calibrationC::internalCrosstalk
* Calls the method OPT3101::crosstalkC::report for debug and data analysis
* Calls the method OPT3101::crosstalkC::report for debug and data analysis
Definition at line 76 of file OPT3101device_Functions.cpp.
| bool validateDesignID | ( | ) |
validates if design ID is correct This methods verifies if design ID matches with what is expected from the device
- Returns:
- status; Status bit if True Design ID matches and if False the design ID doesnt match up
Algorithm of the method is as follows
Definition at line 134 of file OPT3101device_Functions.cpp.
| bool validateI2C | ( | ) |
validates I2C communication This methods verifies if I2C protocol is working on the host
- Returns:
- status; Status bit if True I2C is working and if False its not working
Algorithm of the method is as follows
Definition at line 100 of file OPT3101device_Functions.cpp.
Field Documentation
Instance of the calibration class OPT3101::calibrationC. This instance acts a staging area to load, save and calculate calibration coefficients during initial bring up, debug and factory calibration steps.
Definition at line 69 of file OPT3101device.h.
Configuration value specifying exponent component of average frame count which is set by OPT3101 configurator tool.
Definition at line 341 of file OPT3101device.h.
Configuration value specifying frame time in milli-seconds which is set by OPT3101 configurator tool.
Definition at line 342 of file OPT3101device.h.
Configuration value specifying the active register set by OPT3101 congifigurator tool.
Definition at line 344 of file OPT3101device.h.
Configuration value specifying the active channels set by OPT3101 congifigurator tool.
Definition at line 343 of file OPT3101device.h.
Configuration flag to specify if the device is operating in mono shot mode which is set by OPT3101 configurator tool.
Definition at line 337 of file OPT3101device.h.
Configuration value of crosstalk filter time constant which is set by OPT3101 configurator tool.
Definition at line 338 of file OPT3101device.h.
Configuration value specifying the time constant in data ready counts which is set by OPT3101 configurator tool.
Definition at line 340 of file OPT3101device.h.
Configuration value specifying the time constant in milliseconds which is set by OPT3101 configurator tool.
Definition at line 339 of file OPT3101device.h.
Instance of the register class OPT3101::registers control for the device dev.reg.{registerName}=value initiates I2C register writes.
Definition at line 68 of file OPT3101device.h.
Generated on Sun Jul 17 2022 05:22:03 by
1.7.2