AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
|
This file is part of the AFBR-S50 Explorer Demo Application. More...
#include "core/core_device.h"
#include "core/core_cfg.h"
#include "core/explorer_config.h"
#include "api/explorer_api.h"
#include "explorer_tasks.h"
#include "explorer_app.h"
#include "argus.h"
#include "sci/sci.h"
#include "tasks/task_scheduler.h"
#include "debug.h"
#include <assert.h>
#include <string.h>
Macros | |
#define | ARGUSRESULTBUFFER_SIZE (2U * EXPLORER_DEVICE_COUNT) |
#define | EVENTQ_SIZE (2U + 2U * EXPLORER_DEVICE_COUNT) |
#define | PING_PERIOD_MS 333U |
Enumerations | |
enum | buffer_status_t { BUFFER_EMTPY = 0 , BUFFER_BUSY = 1 , BUFFER_FULL = 2 , BUFFER_ERROR = -1 } |
Functions | |
static void | Task_EvaluateMeasurementData (argus_hnd_t *argus) |
static void | Task_SendMeasurementData (argus_resultsbuffer_t *buffer) |
static void | Task_HandleCommand (sci_frame_t *frame) |
static void | Task_Error (error_event_t *e) |
static void | Task_Idle (idle_event_t *e) |
static status_t | SCI_RxCommandCallbackHandler (sci_frame_t *cmd) |
static void | SCI_ErrorCallbackHandler (status_t status) |
status_t | ExplorerApp_InitTasks () |
Initializes the scheduler tasks. | |
void | ExplorerApp_Run (void) |
This runs the state machine. | |
void | ExplorerApp_SwitchContext (void) |
Switches the scheduler task context. | |
static status_t | OnError (status_t status, char *message) |
status_t | ExplorerApp_MeasurementReadyCallback (status_t status, argus_hnd_t *argus) |
Callback function after measurement cycle was finished. | |
Variables | |
static scheduler_t * | myScheduler = NULL |
static task_event_t | EventQ_Error [EVENTQ_SIZE] = {0} |
static task_event_t | EventQ_Idle [EVENTQ_SIZE] = {0} |
static task_event_t | EventQ_SendResults [EVENTQ_SIZE] = {0} |
static task_event_t | EventQ_EvalData [EVENTQ_SIZE] = {0} |
static task_event_t | EventQ_HandleCommand [2 *EVENTQ_SIZE] = {0} |
This file is part of the AFBR-S50 Explorer Demo Application.
This file contains the main functionality of the Explorer Application.
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 ARGUSRESULTBUFFER_SIZE (2U * EXPLORER_DEVICE_COUNT) |
Size of the Argus results data buffer.
#define EVENTQ_SIZE (2U + 2U * EXPLORER_DEVICE_COUNT) |
Size of the event queue.
#define PING_PERIOD_MS 333U |
The period to trigger a SPI ping signal to the device.
enum buffer_status_t |
|
static |
Callback function for error occurred within the SCI/UART module.
|
static |
Callback function for new command received from SCI module.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |