AFBR-S50 API Reference Manual
v1.6.5
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
|
This file is part of the AFBR-S50 Explorer Application. More...
#include "sci.h"
#include "sci_datalink.h"
#include "sci_cmd.h"
#include "sci_handshaking.h"
#include "debug.h"
#include <assert.h>
Macros | |
#define | SCI_MAX_COMMANDS 64u |
Functions | |
status_t | SCI_CMD_Init (void) |
Initialize the serial commands module. More... | |
status_t | SCI_Init (void) |
Initialize the SCI module. More... | |
void | SCI_SetRxCommandCallback (sci_rx_cmd_cb_t cb) |
Installs a callback routine for command received event. More... | |
void | SCI_RemoveRxCommandCallback (void) |
Removes the previously installed callback function. More... | |
void | SCI_SetErrorCallback (sci_error_cb_t cb) |
Installs a callback routine for the error event. More... | |
void | SCI_RemoveErrorCallback (void) |
Removes the previously installed callback function. More... | |
status_t | SCI_SetRxCommand (sci_cmd_t cmd, sci_rx_cmd_fct_t rxfct) |
Sets a Rx command function in the list of available commands. More... | |
status_t | SCI_SetPostRxCommand (sci_cmd_t cmd, sci_rx_cmd_fct_t rxfct, sci_rx_cmd_fct_t pfct) |
Sets Rx and post Rx command functions in the list of available commands. More... | |
status_t | SCI_SetTxCommand (sci_cmd_t cmd, sci_tx_cmd_fct_t txfct) |
Sets a Tx command function in the list of available commands. More... | |
status_t | SCI_SetRxTxCommand (sci_cmd_t cmd, sci_rx_cmd_fct_t rxfct, sci_tx_cmd_fct_t txfct) |
Sets the Rx and Tx command functions in the list of available commands. More... | |
status_t | SCI_SetCommand (sci_cmd_t cmd, sci_rx_cmd_fct_t rxfct, sci_tx_cmd_fct_t txfct, sci_rx_cmd_fct_t pfct) |
Sets the Rx and Tx command functions in the list of available commands. More... | |
status_t | SCI_UnsetCommand (sci_cmd_t cmd) |
Unsets a command from the list of available commands. More... | |
status_t | SCI_InvokeRxCommand (sci_frame_t *frame) |
Invokes the previously received user command. More... | |
status_t | SCI_SendCommand (sci_device_t deviceID, sci_cmd_t cmd, sci_param_t param, sci_data_t data) |
Sends a command via the SCI module. More... | |
Variables | |
sci_rx_cmd_cb_t | SCI_RxCallback |
sci_error_cb_t | SCI_ErrorCallback |
static sci_cmd_ctrl_block_t | myCCB [SCI_MAX_COMMANDS] = {{0}} |
This file is part of the AFBR-S50 Explorer Application.
This file implements the API of the systems communication interface.
Copyright (c) 2023, Broadcom Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define SCI_MAX_COMMANDS 64u |
Max. number of commands.
status_t SCI_CMD_Init | ( | void | ) |
|
static |
The command control block buffer.
sci_error_cb_t SCI_ErrorCallback |
Callback function pointer for error event.
sci_rx_cmd_cb_t SCI_RxCallback |
Callback function pointer for received frame event.