AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches
uart_api.h
Go to the documentation of this file.
1/*************************************************************************/
40#ifndef UART_API_H_
41#define UART_API_H_
42
43#include "argus.h"
44
45/*!***************************************************************************
46 * @defgroup uart_intf UART API interface
47 * @ingroup can_app
48 *
49 * @brief UART interface for the AFBR-S50 Reference Board CAN application.
50 *
51 * @details A simple UART interface to demonstrate the basic usage of the
52 * UART bus that comes with the AFBR-S50 Reference Board.
53 *
54 * @addtogroup uart_intf
55 * @{
56 *****************************************************************************/
57
58/*!***************************************************************************
59 * @brief Initializes the UART API module.
60 *****************************************************************************/
61void UART_API_Init(void);
62
63
64/*!***************************************************************************
65 * @brief Handles incoming UART commands by invoking the corresponding methods.
66 *
67 * @details Checks the incomming data queue and handles/invokes commands
68 * accordingly.
69 *
70 * Note that this function must be called from thread level (not from
71 * interrupt service routines) in order to be executed correctly.
72 *****************************************************************************/
73void UART_HandleCommand(void);
74
75/*!***************************************************************************
76 * @brief Prints measurement results via UART.
77 *
78 * @details Print the recent measurement results:
79 *
80 * 1. Time stamp in seconds since the last MCU reset.
81 * 2. Range in mm (converting the Q9.22 value to mm)
82 * 3. Amplitude in LSB (converting the UQ12.4 value to LSB)
83 * 4. Signal Quality in % (100% = good signal).
84 * 4. Status (0: OK, <0: Error, >0: Warning
85 *
86 * @note Sending data via UART creates a large delay which might prevent
87 * the API from reaching the full frame rate. This example sends
88 * approximately 80 characters per frame at 115200 bps which limits
89 * the max. frame rate of 144 fps:
90 * 115200 bps / 10 [bauds-per-byte] / 80 [bytes-per-frame] = 144 fps
91 *
92 * @param res A pointer to the latest measurement results structure.
93 *****************************************************************************/
94void UART_Send1D(argus_results_t const * res);
95
97#endif /* UART_API_H_ */
This file is part of the AFBR-S50 API.
void UART_API_Init(void)
Initializes the UART API module.
Definition uart_api.c:68
void UART_Send1D(argus_results_t const *res)
Prints measurement results via UART.
Definition uart_api.c:80
void UART_HandleCommand(void)
Handles incoming UART commands by invoking the corresponding methods.
Definition uart_api.c:91
The measurement results data structure.
Definition argus_res.h:216