AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches
core_device.c File Reference

This file is part of the AFBR-S50 Explorer Demo Application. More...

#include "core_device.h"
#include "core_cfg.h"
#include "core_flash.h"
#include "core_utils.h"
#include <assert.h>
#include "driver/s2pi.h"
#include "debug.h"
#include "explorer_config.h"
Include dependency graph for core_device.c:

Functions

static status_t CheckConnectedDevice (sci_device_t slave)
 
argus_hnd_tExplorerApp_GetArgusPtr (sci_device_t deviceID)
 Gets the Argus device instance handle pointer.
 
explorer_tExplorerApp_GetExplorerPtr (sci_device_t deviceID)
 Gets the Explorer instance handle pointer.
 
explorer_tExplorerApp_GetExplorerPtrFromArgus (argus_hnd_t *argus)
 Gets the Explorer instance handle pointer given an Argus handle pointer.
 
uint8_t ExplorerApp_GetInitializedExplorerCount ()
 Gets the number of initialized Argus sensor devices.
 
explorer_tExplorerApp_GetInitializedExplorer (uint8_t index)
 Gets the initialized Explorer instance handle pointer given its index in the list. This is used to obtain a consecutive list of instances, regardless of their DeviceID (the DeviceID could be non-consecutive).
 
sci_device_t ExplorerApp_GetDeviceID (explorer_t *explorer)
 Gets the device ID of the specified Explorer instance pointer.
 
status_t ExplorerApp_InitDevice (explorer_t *explorer, argus_mode_t mode, bool reinit)
 Initializes the associated Argus device handle belonging to an Explorer instance handle pointer.
 
status_t ExplorerApp_DeviceReinit (explorer_t *explorer, argus_mode_t mode)
 Reinitializes the device w/ default settings w/o MCU reset.
 
status_t ExplorerApp_InitExplorer (sci_device_t deviceID)
 Initializes the selected Explorer instance handle pointer with the selected device ID.
 

Variables

static explorer_t explorerArray [EXPLORER_DEVICE_COUNT] = { 0 }
 
static explorer_texplorerIDMap [S2PI_SLAVE_COUNT+1] = { 0 }
 

Detailed Description

This file is part of the AFBR-S50 Explorer Demo Application.

This file contains the hardware API 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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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.

Function Documentation

◆ CheckConnectedDevice()

static status_t CheckConnectedDevice ( sci_device_t  slave)
static

Variable Documentation

◆ explorerArray

explorer_t explorerArray[EXPLORER_DEVICE_COUNT] = { 0 }
static

◆ explorerIDMap

explorer_t* explorerIDMap[S2PI_SLAVE_COUNT+1] = { 0 }
static