Vijayaraghavan Narayanan / VLX6180X_API
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers common_driver.h Source File

common_driver.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 ################################################################################
00003 #                             (C) STMicroelectronics 2014
00004 #
00005 # This program is free software; you can redistribute it and/or modify it under
00006 # the terms of the GNU General Public License version 2 and only version 2 as
00007 # published by the Free Software Foundation.
00008 #
00009 # This program is distributed in the hope that it will be useful, but WITHOUT
00010 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00012 # details.
00013 #
00014 # You should have received a copy of the GNU General Public License along with
00015 # this program; if not, write to the Free Software Foundation, Inc.,
00016 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017 #
00018 #------------------------------------------------------------------------------
00019 #                             Imaging Division
00020 ################################################################################
00021 ********************************************************************************/
00022 
00023 /*!
00024  *\file common_driver.h
00025  *\brief Application-level methods used for generic, system or identification operations.
00026  */
00027 
00028 #ifndef _RANGE_DRIVER
00029 #define _RANGE_DRIVER
00030 
00031 #include "definitions.h"
00032 #include "platform.h"
00033 //-----------------------------------------------------------------------------
00034 // module imports
00035 //-----------------------------------------------------------------------------
00036 
00037 // "circle_types.h" included for following definition :
00038 //#ifndef __cplusplus
00039 //typedef enum {FALSE = 0, TRUE = !FALSE} bool;
00040 //#endif
00041 
00042 
00043 //-----------------------------------------------------------------------------
00044 // constant definitions
00045 //-----------------------------------------------------------------------------
00046 
00047 // API Version Strings
00048 #define API_MAJOR_VERSION                      01
00049 #define API_MINOR_VERSION                      00
00050 #define API_BUILD_NUMBER                       00
00051 #define API_CODE_REVISION                      1590
00052 
00053 // register addresses
00054 #define SYSTEM_MODE_GPIO0                      0x10
00055 #define SYSTEM_MODE_GPIO1                      0x11
00056 #define SYSTEM_HISTORY_CTRL                    0x12
00057 #define SYSTEM_INTERRUPT_CONFIG_GPIO           0x14
00058 #define SYSTEM_INTERRUPT_CLEAR                 0x15
00059 #define SYSTEM_FRESH_OUT_OF_RESET              0x16
00060 #define SYSTEM_GROUPED_PARAMETER_HOLD          0x17
00061 
00062 #define RESULT_INTERRUPT_STATUS_GPIO           0x4F
00063 
00064 #define PAD_I2C_CONFIG                         0x13D
00065 
00066 #define I2C_SLAVE_DEVICE_ADDRESS               0x212
00067 
00068 #define SYSTEM_FATAL_ERROR_CODE                0x290
00069 #define SYSTEM_FATAL_ERROR_STATUS              0x291
00070 
00071 
00072 
00073 // PAD_I2C_CONFIG
00074 #define I2C_1v2_PAD_VOLTAGE                    0x01
00075 #define I2C_2v8_PAD_VOLTAGE                    0x02
00076 
00077 // SYSTEM_INTERRUPT_CONFIG_GPIO
00078 #define CONFIG_GPIO_INTERRUPT_DISABLED         0x00
00079 #define CONFIG_GPIO_INTERRUPT_LEVEL_LOW        0x01
00080 #define CONFIG_GPIO_INTERRUPT_LEVEL_HIGH       0x02
00081 #define CONFIG_GPIO_INTERRUPT_OUT_OF_WINDOW    0x03
00082 #define CONFIG_GPIO_INTERRUPT_NEW_SAMPLE_READY 0x04
00083 
00084 // SYSTEM_MODE_GPIOx
00085 #define GPIOx_MODE_SELECT_RANGING              0x00
00086 #define GPIOx_MODE_SELECT_ALS                  0x01
00087 
00088 #define GPIOx_POLARITY_SELECT_OFF              0x00
00089 #define GPIOx_POLARITY_SELECT_ON               0x01
00090 #define GPIOx_POLARITY_SELECT_CLEARED          0xDF
00091 
00092 #define GPIOx_MODE_SELECT                      0x01
00093 #define GPIOx_POLARITY_SELECT                  0x20
00094 
00095 #define GPIOx_SELECT_OFF                       0x00
00096 #define GPIOx_SELECT_MEASURE_READY             0x01
00097 #define GPIOx_SELECT_THRESHOLD_OUTPUT          0x02
00098 #define GPIOx_SELECT_BLANK_IN                  0x03
00099 #define GPIOx_SELECT_BLANK_OUT                 0x04
00100 #define GPIOx_SELECT_START_STOP                0x05
00101 #define GPIOx_SELECT_DISABLED                  0x06
00102 #define GPIOx_SELECT_COMBINED_THRESHOLD_OUTPUT 0x07
00103 #define GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT     0x08
00104 
00105 // SYSTEM_HISTORY_CTRL
00106 #define HISTORY_BUFFER_ENABLE                  0x01
00107 #define HISTORY_BUFFER_DISABLE                 0x00
00108 
00109 #define HISTORY_BUFFER_ENABLED                 0x01
00110 #define HISTORY_BUFFER_MODE                    0x02
00111 #define HISTORY_BUFFER_CLEARED                 0x04
00112 
00113 #define HISTORY_BUFFER_RANGING_MODE            0x00
00114 #define HISTORY_BUFFER_ALS_MODE                0x01
00115 
00116 // SYSTEM_INTERRUPT_CLEAR
00117 #define INTERRUPT_CLEAR_RANGING                0x01
00118 #define INTERRUPT_CLEAR_ALS                    0x02
00119 #define INTERRUPT_CLEAR_ERROR                  0x04
00120 
00121 // RESULT_INTERRUPT_STATUS_GPIO
00122 #define RES_INT_STAT_GPIO_NO_ERROR             0x00
00123 #define RES_INT_STAT_GPIO_LOW_LEVEL_THRESHOLD  0x01
00124 #define RES_INT_STAT_GPIO_HIGH_LEVEL_THRESHOLD 0x02
00125 #define RES_INT_STAT_GPIO_OUT_OF_WINDOW        0x03
00126 #define RES_INT_STAT_GPIO_NEW_SAMPLE_READY     0x04
00127 
00128 
00129 //-----------------------------------------------------------------------------
00130 // global variable declarations
00131 //-----------------------------------------------------------------------------
00132 
00133 //-----------------------------------------------------------------------------
00134 // method definitions
00135 //-----------------------------------------------------------------------------
00136 
00137 /*!
00138  *
00139  */
00140 sensor_error common_initialise(uint8_t device_base_address);
00141 
00142 /*!
00143  *\brief Device setup for Ranging and ALS operations.\n
00144  *
00145  * To apply these settings the operation bits (bit 0) in the SYSRANGE_START SYSALS_START Registers must be cleared. \n
00146  *
00147  *\param[in] device_base_address
00148  *\retval sensor_error
00149  */
00150 sensor_error common_set_static_config(uint8_t device_base_address);
00151 
00152 /*!
00153  *\brief Report device Identification Info.
00154  *
00155  * Return the contents of the Identification block registers, in the following order : \n
00156  *
00157  * IDENTIFICATION_MODEL_ID \n
00158  * IDENTIFICATION_MODEL_REV_MAJOR \n
00159  * IDENTIFICATION_MODEL_REV_MINOR \n
00160  * IDENTIFICATION_MODULE_REV_MAJOR \n
00161  * IDENTIFICATION_MODULE_REV_MINOR \n
00162  * IDENTIFICATION_NVM_REVISION_ID \n
00163  * IDENTIFICATION_MASK_REVISION_ID \n
00164  * IDENTIFICATION_month \n
00165  * IDENTIFICATION_year \n
00166  * IDENTIFICATION_phase \n
00167  * IDENTIFICATION_day \n
00168  * IDENTIFICATION_time \n
00169  * IDENTIFICATION_code \n
00170  * IDENTIFICATION_FIRMWARE_REVISION_ID\n
00171  *\param[in] device_base_address
00172  *\retval List
00173  */
00174 sensor_error common_get_identification(uint8_t device_base_address);
00175 
00176 /*!
00177  *\brief Set Device I2C Base Address.
00178  *
00179  * Uses I2C_Slave_Device_address register at 0x0212. Can be over-written by a value read from NVM. \n
00180  * Defaults to 0x52 (8-bit address)/0x29 (7-bit). Register reports a 7-bit value. \n
00181  *\param[in] device_base_address
00182  *\param[in] i2c_base_address 8-bit I2C Slave device base address.
00183  *\retval sensor_error
00184  */
00185 sensor_error common_set_i2c_base_address(uint8_t device_base_address, uint32_t i2c_base_address);
00186 
00187 /*!
00188  *\brief Set I2C Pad Voltage.
00189  *
00190  * I2C Pad External Bus Supply voltage (applies to both pads). Can be overridden by a value read from in NVM. \n
00191  *
00192  * Possible values are : \n
00193  *     I2C_1v8_PAD_VOLTAGE = 0x01 \n
00194  *     I2C_2v8_PAD_VOLTAGE = 0x02 \n
00195  *\param[in] device_base_address
00196  *\param[in] pad_voltage I2C Pad External Bus Supply voltage.
00197  *\retval sensor_error
00198  */
00199 sensor_error common_set_i2c_pad_voltage(uint8_t device_base_address, uint8_t pad_voltage);
00200 
00201 /*!
00202  *\brief Report I2C Pad Voltage.
00203  *
00204  * I2C Pad External Bus Supply voltage.
00205  * Possible values are : \n
00206  *     I2C_1v8_PAD_VOLTAGE = 0x01 \n
00207  *     I2C_2v8_PAD_VOLTAGE = 0x02 \n
00208  *\param[in] device_base_address
00209  *\retval Integer
00210  */
00211 uint8_t common_get_i2c_pad_voltage(uint8_t device_base_address);
00212 
00213 /*!
00214  *\brief Set GPIO0 Mode.
00215  *
00216  * Possible values for mode are : \n
00217  *   GPIOx_MODE_SELECT_RANGING = 0x00 \n
00218  *   GPIOx_MODE_SELECT_ALS     = 0x01 \n
00219  *
00220  * Possible settings for select are : \n
00221  *   GPIOx_SELECT_OFF = 0x00 \n
00222  *   GPIOx_SELECT_MEASURE_READY = 0x01 \n
00223  *   GPIOx_SELECT_DISABLED = 0x06 \n
00224  *   GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT = 0x08 \n
00225  *
00226  * Possible settings for polarity are : \n
00227  *   GPIOx_POLARITY_SELECT_OFF = 0x00 \n
00228  *   GPIOx_POLARITY_SELECT_ON = 0x01 \n
00229  *\param[in] device_base_address
00230  *\param[in] mode Operating mode to be selected.
00231  *\param[in] select
00232  *\param[in] polarity
00233  *\retval sensor_error
00234  */
00235 sensor_error common_set_system_mode_gpio0(uint8_t device_base_address, uint8_t mode, uint8_t select, uint8_t polarity);
00236 
00237 /*!
00238  *\brief Set GPIO0 Mode.
00239  *
00240  * Possible values for mode are : \n
00241  *     GPIOx_MODE_SELECT_RANGING = 0x00 \n
00242  *     GPIOx_MODE_SELECT_ALS     = 0x01 \n
00243  *\param[in] device_base_address
00244  *\param[in] mode: Operating mode to be selected.
00245  *\retval sensor_error
00246  */
00247 sensor_error common_set_gpio0_mode(uint8_t device_base_address, uint8_t mode);
00248 
00249 /*!
00250  *\brief Report GPIO0 Mode.
00251 
00252     Possible results are : \n
00253      GPIOx_MODE_SELECT_RANGING = 0x00 \n
00254      GPIOx_MODE_SELECT_ALS     = 0x01 \n
00255  *\param[in] device_base_address
00256  *\retval Integer
00257 */
00258 uint8_t common_get_gpio0_mode(uint8_t device_base_address);
00259 
00260 /*!
00261  *\brief Set GPIO0 function configuration.
00262 
00263     Possible settings are : \n
00264       GPIOx_SELECT_OFF = 0x00 \n
00265       GPIOx_SELECT_MEASURE_READY = 0x01 \n
00266       GPIOx_SELECT_THRESHOLD_OUTPUT = 0x02 \n
00267       GPIOx_SELECT_BLANK_IN = 0x03 \n
00268       GPIOx_SELECT_BLANK_OUT = 0x04 \n
00269       GPIOx_SELECT_START_STOP = 0x05 \n
00270       GPIOx_SELECT_DISABLED = 0x06 \n
00271       GPIOx_SELECT_COMBINED_THRESHOLD_OUTPUT = 0x07 \n
00272       GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT = 0x08 \n
00273  *\param[in] device_base_address
00274  *\param[in] select:
00275  *\retval sensor_error
00276 */
00277 sensor_error common_set_gpio0_select(uint8_t device_base_address, uint8_t select);
00278 
00279 /*!
00280  *\brief Report GPIO0 functional configuration.
00281 
00282     Possible results are : \n
00283       GPIOx_SELECT_OFF = 0x00 \n
00284       GPIOx_SELECT_MEASURE_READY = 0x01 \n
00285       GPIOx_SELECT_THRESHOLD_OUTPUT = 0x02 \n
00286       GPIOx_SELECT_BLANK_IN = 0x03 \n
00287       GPIOx_SELECT_BLANK_OUT = 0x04 \n
00288       GPIOx_SELECT_START_STOP = 0x05 \n
00289       GPIOx_SELECT_DISABLED = 0x06 \n
00290       GPIOx_SELECT_COMBINED_THRESHOLD_OUTPUT = 0x07 \n
00291       GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT = 0x08 \n
00292  *\param[in] device_base_address
00293  *\retval Integer
00294 */
00295 uint8_t common_get_gpio0_select(uint8_t device_base_address);
00296 
00297 /*!
00298  *\brief Set GPIO0 Polarity.
00299 
00300     Possible settings are : \n
00301       GPIOx_POLARITY_SELECT_OFF = 0x00 \n
00302       GPIOx_POLARITY_SELECT_ON = 0x01 \n
00303  *\param[in] device_base_address
00304  *\param[in] polarity:
00305  *\retval sensor_error
00306 */
00307 sensor_error common_set_gpio0_polarity(uint8_t device_base_address, uint8_t polarity);
00308 
00309 /*!
00310  *\brief Report GPIO0 Polarity.
00311  *
00312  * Report the status of the GPIO_0 Polarity select bit in SYSTEM_MODE_GPIO0 register. \n
00313  *\param[in] device_base_address
00314  *\retval Boolean
00315 */
00316 bool_t common_get_gpio0_polarity(uint8_t device_base_address);
00317 
00318 /*!
00319  *\brief Set GPIO1 Mode.
00320 
00321     Possible values for mode are : \n
00322       GPIOx_MODE_SELECT_RANGING = 0x00 \n
00323       GPIOx_MODE_SELECT_ALS     = 0x01 \n
00324 
00325     Possible settings for select are : \n
00326       GPIOx_SELECT_OFF = 0x00 \n
00327       GPIOx_SELECT_MEASURE_READY = 0x01 \n
00328       GPIOx_SELECT_DISABLED = 0x06 \n
00329       GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT = 0x08 \n
00330 
00331     Possible settings for polarity are : \n
00332       GPIOx_POLARITY_SELECT_OFF = 0x00 \n
00333       GPIOx_POLARITY_SELECT_ON = 0x01 \n
00334  *\param[in] device_base_address
00335  *\param[in] mode: Operating mode to be selected.
00336  *\param[in] select:
00337  *\param[in] polarity:
00338  *\retval sensor_error
00339 */
00340 sensor_error common_set_system_mode_gpio1(uint8_t device_base_address, uint8_t mode, uint8_t select, uint8_t polarity);
00341 
00342 /*!
00343  *\brief Set GPIO1 Mode.
00344 
00345   Possible mode settings are : \n
00346      GPIOx_MODE_SELECT_RANGING = 0x00 \n
00347      GPIOx_MODE_SELECT_ALS     = 0x01 \n
00348  *\param[in] device_base_address
00349  *\param[in] mode:
00350  *\retval sensor_error
00351 */
00352 sensor_error common_set_gpio1_mode(uint8_t device_base_address, uint8_t mode);
00353 
00354 /*!
00355  *\brief Report GPIO1 Mode.
00356 
00357     Possible results are : \n
00358       GPIOx_MODE_SELECT_RANGING = 0x00 \n
00359       GPIOx_MODE_SELECT_ALS     = 0x01 \n
00360  *\param[in] device_base_address
00361  *\retval Integer
00362 */
00363 uint8_t common_get_gpio1_mode(uint8_t device_base_address);
00364 
00365 /*!
00366  *\brief Set GPIO1 functional configuration.
00367 
00368     Possible settings are : \n
00369       GPIOx_SELECT_OFF = 0x00 \n
00370       GPIOx_SELECT_MEASURE_READY = 0x01 \n
00371       GPIOx_SELECT_THRESHOLD_OUTPUT = 0x02 \n
00372       GPIOx_SELECT_BLANK_IN = 0x03 \n
00373       GPIOx_SELECT_BLANK_OUT = 0x04 \n
00374       GPIOx_SELECT_START_STOP = 0x05 \n
00375       GPIOx_SELECT_DISABLED = 0x06 \n
00376       GPIOx_SELECT_COMBINED_THRESHOLD_OUTPUT = 0x07 \n
00377       GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT = 0x08 \n
00378  *\param[in] device_base_address
00379  *\param[in] select:
00380  *\retval sensor_error
00381 */
00382 sensor_error common_set_gpio1_select(uint8_t device_base_address, uint8_t select);
00383 
00384 /*!
00385  *\brief Report GPIO1 functional configuration.
00386 
00387     Possible results are : \n
00388       GPIOx_SELECT_OFF = 0x00 \n
00389       GPIOx_SELECT_MEASURE_READY = 0x01 \n
00390       GPIOx_SELECT_THRESHOLD_OUTPUT = 0x02 \n
00391       GPIOx_SELECT_BLANK_IN = 0x03 \n
00392       GPIOx_SELECT_BLANK_OUT = 0x04 \n
00393       GPIOx_SELECT_START_STOP = 0x05 \n
00394       GPIOx_SELECT_DISABLED = 0x06 \n
00395       GPIOx_SELECT_COMBINED_THRESHOLD_OUTPUT = 0x07 \n
00396       GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT = 0x08 \n
00397  *\param[in] device_base_address
00398  *\retval Integer
00399 */
00400 uint8_t common_get_gpio1_select(uint8_t device_base_address);
00401 
00402 /*!
00403  *\brief Set GPIO1 Polarity.
00404 
00405       GPIOx_POLARITY_SELECT_OFF = 0x00 \n
00406       GPIOx_POLARITY_SELECT_ON = 0x01 \n
00407  *\param[in] device_base_address
00408  *\param[in] polarity:
00409  *\retval sensor_error
00410 */
00411 sensor_error common_set_gpio1_polarity(uint8_t device_base_address, uint8_t polarity);
00412 
00413 /*!
00414  *\brief Report GPIO1 Polarity.
00415 
00416     Report the status of the GPIO_0 Polarity select bit in SYSTEM_MODE_GPIO0 register.
00417  *\param[in] device_base_address
00418  *\retval Boolean
00419 */
00420 bool_t common_get_gpio1_polarity(uint8_t device_base_address);
00421 
00422 /*!
00423  *\brief Set History Buffer Enable.
00424 
00425     Possible settings are : \n
00426       HISTORY_BUFFER_ENABLE = 0x01 \n
00427       HISTORY_BUFFER_DISABLE = 0x00 \n
00428  *\param[in] device_base_address
00429  *\param[in] history_buffer_enable:
00430  *\retval sensor_error
00431 */
00432 sensor_error common_set_history_buffer_enable(uint8_t device_base_address, uint8_t history_buffer_enable);
00433 
00434 /*!
00435  *\brief Report History Buffer Enable status.
00436 
00437     Returns True if the command completes successfully, otherwise False.\n
00438  *\param[in] device_base_address
00439  *\retval Boolean
00440 */
00441 bool_t common_get_history_buffer_enable(uint8_t device_base_address);
00442 
00443 /*!
00444  *\brief Set History Buffer Mode.
00445 
00446     Possible modes are : \n
00447       HISTORY_BUFFER_RANGING_MODE = 0x00 \n
00448       HISTORY_BUFFER_ALS_MODE = 0x01 \n
00449  *\param[in] device_base_address
00450  *\param[in] history_buffer_mode:
00451  *\retval sensor_error
00452 */
00453 sensor_error common_set_history_buffer_mode(uint8_t device_base_address, uint8_t history_buffer_mode);
00454 
00455 /*!
00456  *\brief Report History Buffer Mode.
00457 
00458     Returns the contents of the SYSTEM_HISTORY_CTRL register. \n
00459     Possible values are : \n
00460       HISTORY_BUFFER_RANGING_MODE = 0x00 \n
00461       HISTORY_BUFFER_ALS_MODE = 0x01 \n
00462  *\param[in] device_base_address
00463  *\retval Integer
00464 */
00465 uint8_t common_get_history_buffer_mode(uint8_t device_base_address);
00466 
00467 /*!
00468  *\brief Clear history buffer (mode not cleared)
00469  *\param[in] device_base_address
00470  *\retval sensor_error
00471 */
00472 sensor_error common_set_history_buffer_clear(uint8_t device_base_address);
00473 
00474 /*!
00475  *\brief Report History Buffer Clear status.
00476  *
00477  * Returns True if the SYSTEM_HISTORY_CTRL register is cleared, otherwise False. \n
00478  *\param[in] device_base_address
00479  *\retval Boolean
00480 */
00481 bool_t common_get_history_buffer_clear(uint8_t device_base_address);
00482 
00483 /*!
00484  *\brief Clear 'Error' System Interrupt.
00485  *\param[in] device_base_address
00486  *\retval sensor_error
00487 */
00488 sensor_error common_set_system_interrupt_clear_error(uint8_t device_base_address);
00489 
00490 /*!
00491  *\brief Report GPIO Interrupt Error Result Status.
00492 
00493     Returns the Error flag portion of the RESULT_INTERRUPT_STATUS_GPIO register. \n
00494     Possible returns are : \n
00495     0: No error reported \n
00496     1: Laser Safety Error \n
00497     2: PLL error (either PLL1 or PLL2) \n
00498     3: Measurement error \n
00499  *\param[in] device_base_address
00500  *\retval Integer
00501 */
00502 uint8_t common_get_error_result_interrupt_status_gpio(uint8_t device_base_address);
00503 
00504 /*!
00505  *\brief Clear System Fresh Out Of Reset flag.
00506  *
00507  * The fresh out of reset bit defaults to 1 at boot-up. The user can set this to 0 after initial boot and then use this flag to check for reset conditions.
00508  *\param[in] device_base_address
00509  *\retval sensor_error
00510 */
00511 sensor_error common_clear_system_fresh_out_of_reset(uint8_t device_base_address);
00512 
00513 /*!
00514  *\brief Report System Fresh Out Of Reset status.
00515  *
00516  * Returns True if the SYSTEM_FRESH_OUT_OF_RESET register status is set, otherwise False. \n
00517  *\param[in] device_base_address
00518  *\retval Boolean
00519 */
00520 bool_t common_get_system_fresh_out_of_reset(uint8_t device_base_address);
00521 
00522 /*!
00523  *\brief Set System Group Parameter Hold flag.
00524 
00525     The grouped_parameter_hold flag is set to indicate that device data is being updated. \n
00526     0: Data is stable - user is safe to copy. \n
00527     1: Data being updated - user not safe to copy. \n
00528  *\param[in] device_base_address
00529  *\retval sensor_error
00530 */
00531 sensor_error common_set_system_group_parameter_hold(uint8_t device_base_address);
00532 
00533 /*!
00534  *\brief Clear System Group Parameter Hold flag.
00535 
00536     The grouped_parameter_hold flag is set to indicate that device data is being updated. \n
00537     0: Data is stable - user is safe to copy. \n
00538     1: Data being updated - user not safe to copy. \n
00539  *\param[in] device_base_address
00540  *\retval sensor_error
00541 */
00542 sensor_error common_clear_system_group_parameter_hold(uint8_t device_base_address);
00543 
00544 /*!
00545  *\brief Report System Fatal Error Code flag status.
00546  *
00547  * Returns the contents of the SYSTEM_FATAL_ERROR_CODE register, which is written to when a fatal error occurs.
00548  *\param[in] device_base_address
00549  *\retval Integer
00550 */
00551 uint8_t common_get_system_fatal_error_code(uint8_t device_base_address);
00552 
00553 /*!
00554  *\brief Report System Fatal Error Status.
00555 
00556     Returns the contents of the SYSTEM_FATAL_ERROR_STATUS register, which is written to when a fatal error occurs.\n
00557 
00558     Read Only HW status bit, set high when a 1 is written into FATAL_ERROR_CODE. \n
00559     Checked by FW on bootup to ascertain device status. Can only be rest by a main Go2 reset. \n
00560  *\param[in] device_base_address
00561  *\retval Integer
00562 */
00563 uint8_t common_get_system_fatal_error_status(uint8_t device_base_address);
00564 
00565 /*!
00566  *\brief Report System Health.
00567  *
00568  * A combination of fresh_from_reset, fatal_error and laser safety checks
00569  *\param[in] device_base_address
00570  *\retval Integer. A combined system health flag.
00571 */
00572 uint8_t common_get_system_health_check(uint8_t device_base_address);
00573 
00574 #endif
00575 
00576