AFBR-S50 API Reference Manual
v1.6.5
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
sci_cmd.h
Go to the documentation of this file.
1
/*************************************************************************/
38
#ifndef SCI_CMD_H
39
#define SCI_CMD_H
40
41
/*!***************************************************************************
42
* @defgroup sci_cmd SCI: Generic Command Definitions
43
* @ingroup sci
44
* @brief Generic Command Definitions
45
* @details Generic command definitions for the systems communication interface.
46
* @addtogroup sci_cmd
47
* @{
48
*****************************************************************************/
49
50
#include "
sci.h
"
51
53
#define SCI_LOG_TIMESTAMP 1
54
55
57
enum
GenericSerialCommandCodes
58
{
59
CMD_INVALID
= 0x00,
61
/* Generic commands. */
62
CMD_PING
= 0x01,
63
CMD_LOG_MESSAGE
= 0x06,
64
CMD_STATUS_REPORT
= 0x07,
65
CMD_SYSTEM_RESET
= 0x08,
66
CMD_ACKNOWLEDGE
= 0x0A,
67
CMD_NOT_ACKNOWLEDGE
= 0x0B,
69
/* Misc. commands. */
70
CMD_TEST_MESSAGE
= 0x04,
72
};
73
74
/*!***************************************************************************
75
* @brief Sends an status report.
76
* @param deviceID The slave ID of the sensor handler to process the command.
77
* @param status The status value to be reported.
78
* @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
79
*****************************************************************************/
80
status_t
SCI_SendStatusReport
(
sci_device_t
deviceID,
status_t
status
);
81
82
/*!***************************************************************************
83
* @brief Sends a log message.
84
* @param fmt_s The printf() format string.
85
* @param ... The printf() arguments.
86
* @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
87
*****************************************************************************/
88
status_t
SCI_SendLogEntry
(
const
char
*fmt_s, ...);
89
90
/*!***************************************************************************
91
* @brief Sends a log message.
92
* @param fmt_s The printf() format string.
93
* @param ... The printf() arguments.
94
* @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
95
*****************************************************************************/
96
status_t
SCI_Printf
(
const
char
*fmt_s, ...);
97
99
#endif
/* SCI_CMD_H */
sci_device_t
uint8_t sci_device_t
Definition:
sci.h:99
CMD_TEST_MESSAGE
@ CMD_TEST_MESSAGE
Definition:
sci_cmd.h:70
GenericSerialCommandCodes
GenericSerialCommandCodes
Definition:
sci_cmd.h:57
SCI_Printf
status_t SCI_Printf(const char *fmt_s,...)
Sends a log message.
sci.h
SCI: The main interface.
CMD_NOT_ACKNOWLEDGE
@ CMD_NOT_ACKNOWLEDGE
Definition:
sci_cmd.h:67
CMD_ACKNOWLEDGE
@ CMD_ACKNOWLEDGE
Definition:
sci_cmd.h:66
CMD_STATUS_REPORT
@ CMD_STATUS_REPORT
Definition:
sci_cmd.h:64
CMD_PING
@ CMD_PING
Definition:
sci_cmd.h:62
CMD_INVALID
@ CMD_INVALID
Definition:
sci_cmd.h:59
CMD_LOG_MESSAGE
@ CMD_LOG_MESSAGE
Definition:
sci_cmd.h:63
SCI_SendLogEntry
status_t SCI_SendLogEntry(const char *fmt_s,...)
Sends a log message.
Definition:
sci_log.c:96
SCI_SendStatusReport
status_t SCI_SendStatusReport(sci_device_t deviceID, status_t status)
Sends an status report.
Definition:
sci_cmd.c:135
status
static status_t status
Definition:
argus_xtalk_cal_cli.c:140
CMD_SYSTEM_RESET
@ CMD_SYSTEM_RESET
Definition:
sci_cmd.h:65
status_t
int32_t status_t
Type used for all status and error return values.
Definition:
argus_status.h:70
Sources
explorer_app
sci
sci_cmd.h
Broadcom Inc.