AFBR-S50 API Reference Manual  v1.6.5
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
core_utils.h
Go to the documentation of this file.
1 /*************************************************************************/
37 #ifndef CORE_UTILS_H
38 #define CORE_UTILS_H
39 
40 /*!***************************************************************************
41  * @defgroup core_utils AFBR-S50 Explorer Application - Util functions
42  * @ingroup explorer_app
43  * @brief AFBR-S50 Explorer Application - Util functions
44  * @details Util functions to be used by the rest of the API.
45  * @addtogroup core_utils
46  * @{
47  *****************************************************************************/
48 
49 #include "explorer_types.h"
50 
51 /*!***************************************************************************
52  * @brief Suspends the current active measurement on the device.
53  * @details Suspends the currently ongoing measurements on the device by calling
54  * the #Argus_StopMeasurementTimer method. Further it checks if data
55  * evaluation of any raw measurement data is pending and performs a
56  * context switch to the corresponding data evaluation task in the task
57  * scheduler.
58  * After the function returns true, the measurements are suspended
59  * and the device is idle and ready to receive other API calls, e.g.
60  * configuration updates.
61  * If the function returns true, use the #ExplorerApp_StartTimerMeasurement
62  * to resume the measurement on the device again.
63  * @param argus The Argus device handler.
64  * @return Returns true if the measurements have been suspended and needs to
65  * be resumed afterwards.
66  *****************************************************************************/
68 
69 /*!***************************************************************************
70  * @brief Starts the measurements.
71  * @param argus The Argus device handler.
72  * @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
73  *****************************************************************************/
75 
76 /*!***************************************************************************
77  * @brief Stops the measurements and goes to idle state.
78  * @param argus The Argus device handler.
79  * @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
80  *****************************************************************************/
82 
83 /*!***************************************************************************
84  * @brief Triggers a single measurement and goes to idle afterwards.
85  * @param argus The Argus device handler.
86  * @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
87  *****************************************************************************/
89 
90 /*!***************************************************************************
91  * @brief Starts the teach-in mode.
92  * @param argus The Argus device handler.
93  * @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
94  *****************************************************************************/
96 
97 /*!***************************************************************************
98  * @brief Stops the teach-in mode and goes to idle state.
99  * @param argus The Argus device handler.
100  * @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
101  *****************************************************************************/
103 
104 /*!***************************************************************************
105  * @brief Aborts all device activity immediately.
106  * @param argus The Argus device handler.
107  * @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
108  *****************************************************************************/
110 
111 /*!***************************************************************************
112  * @brief Displays the unambiguous range in meter on the SLCD display.
113  * @param argus The Argus device handler.
114  *****************************************************************************/
116 
117 
118 #if EXPLORER_API_PRO
119 /*!***************************************************************************
120  * @brief Injects a fault into the system for testing/debugging purposes.
121  * @details A fault injection mechanism that can induce several failures/error
122  * into the system for testing and debugging purposes.
123  * Note: this is for debugging/test purposes only!
124  * @param argus The Argus device handler.
125  * @param failure The fault to be inject, see #explorer_faults_t for details.
126  * @param parameter The abstract parameter for the fault, see the corresponding
127  * fault description for details.
128  *****************************************************************************/
129 status_t ExplorerApp_InjectFault(argus_hnd_t * argus,
130  explorer_faults_t fault,
131  int32_t parameter);
132 #endif
133 
135 #endif /* CORE_UTILS_H */
ExplorerApp_SuspendTimerMeasurement
bool ExplorerApp_SuspendTimerMeasurement(argus_hnd_t *argus)
Suspends the current active measurement on the device.
Definition: core_utils.c:71
explorer_types.h
This file is part of the AFBR-S50 Explorer Demo Application.
argus_hnd_t
struct argus_hnd_t argus_hnd_t
Definition: argus_def.h:320
ExplorerApp_DeviceAbort
status_t ExplorerApp_DeviceAbort(argus_hnd_t *argus)
Aborts all device activity immediately.
Definition: core_utils.c:126
ExplorerApp_StartTimerMeasurement
status_t ExplorerApp_StartTimerMeasurement(argus_hnd_t *argus)
Starts the measurements.
Definition: core_utils.c:84
ExplorerApp_SingleMeasurement
status_t ExplorerApp_SingleMeasurement(argus_hnd_t *argus)
Triggers a single measurement and goes to idle afterwards.
Definition: core_utils.c:100
ExplorerApp_StopTimerMeasurement
status_t ExplorerApp_StopTimerMeasurement(argus_hnd_t *argus)
Stops the measurements and goes to idle state.
Definition: core_utils.c:93
ExplorerApp_StartTeachInMode
status_t ExplorerApp_StartTeachInMode(argus_hnd_t *argus)
Starts the teach-in mode.
Definition: core_utils.c:112
ExplorerApp_StopTeachInMode
status_t ExplorerApp_StopTeachInMode(argus_hnd_t *argus)
Stops the teach-in mode and goes to idle state.
Definition: core_utils.c:119
status_t
int32_t status_t
Type used for all status and error return values.
Definition: argus_status.h:70
ExplorerApp_DisplayUnambiguousRange
void ExplorerApp_DisplayUnambiguousRange(argus_hnd_t *argus)
Displays the unambiguous range in meter on the SLCD display.
Definition: core_utils.c:133