AFBR-S50 API Reference Manual  v1.6.5
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
main.h
Go to the documentation of this file.
1 /*************************************************************************/
36 #ifndef MAIN_H_
37 #define MAIN_H_
38 
39 /*******************************************************************************
40  * Include Files
41  ******************************************************************************/
42 #include "argus.h"
43 #include "debug.h"
44 
45 #if !defined(_RENESAS_RA_)
46 #error No target specified or target not supported!
47 #endif
48 
49 /*!***************************************************************************
50  * @defgroup can_app CAN Application
51  * @ingroup demo_apps
52  *
53  * @brief AFBR-S50 Reference Board CAN-bus example application.
54  *
55  * @details This is the CAN interface example application that can be run
56  * in the \ref reference_board by **MikroElektronika** based on
57  * the **Renesas RA4M2** micro controller.
58  *
59  * The application provides a simple CAN interface as an reference
60  * for the customers own implementation.
61  *
62  * See the following documentation for more information:
63  * - @ref can_app
64  * - @ref reference_board
65  *
66  * @addtogroup can_app
67  * @{
68  *****************************************************************************/
69 
70 
71 /*!***************************************************************************
72  * @brief A very brief example for error handling.
73  *
74  * @details Checks the specified status for errors (i.e. negative values) and
75  * prints a specified error message if any. An endless loop is entered
76  * to halt program execution.
77  *
78  * @param status The specified status to be checked for errors.
79  * @param msg The associated error message to be printed in case of errors.
80  *****************************************************************************/
81 void handle_error(status_t status, char const * msg);
82 
83 
84 /*!***************************************************************************
85  * @brief Starts measurements via the AFBR-S50 API.
86  *
87  * @details The measurements are started via the AFBR-S50 API using the current
88  * device configuration. Nothing happens if the device is already
89  * executing measurements.
90  *
91  * In case of error, the #handle_error method is called.
92  *****************************************************************************/
93 void start_measurements(void);
94 
95 
96 /*!***************************************************************************
97  * @brief Stops the currently ongoing measurements via the AFBR-S50 API.
98  *
99  * @details The measurements are stopped via the AFBR-S50 API. Nothing happens
100  * if the device does not currently execute measurements.
101  *
102  * In case of error, the #handle_error method is called.
103  *****************************************************************************/
104 void stop_measurements(void);
105 
107 #endif /* MAIN_H_ */
handle_error
void handle_error(status_t status, char const *msg)
A very brief example for error handling.
Definition: main.c:265
argus.h
This file is part of the AFBR-S50 API.
start_measurements
void start_measurements(void)
Starts measurements via the AFBR-S50 API.
Definition: main.c:231
stop_measurements
void stop_measurements(void)
Stops the currently ongoing measurements via the AFBR-S50 API.
Definition: main.c:244
status
static status_t status
Definition: argus_xtalk_cal_cli.c:140
status_t
int32_t status_t
Type used for all status and error return values.
Definition: argus_status.h:70