![Logo](AFBR-S50.ico) |
AFBR-S50 API Reference Manual
v1.6.5
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
|
#include "driver/irq.h"
{
return device;
}
{
(void)device;
}
{
static ltc_t t_prev = { 0 };
}
{
const uint8_t a = (uint8_t)((value >> 24) & 0xFFU);
const uint8_t b = (uint8_t)((value >> 16) & 0xFFU);
const uint8_t c = (uint8_t)(value & 0xFFFFU);
print(
"\n##### AFBR-S50 API - High Speed Example #######################\n"
" API Version: v%d.%d.%d\n"
" Chip ID: %d\n"
" Module: %s\n"
"###############################################################\n\n",
a, b, c, id, m);
}
{
HardwareInit();
for (;;)
{
{
}
}
}
argus_mode_t
The measurement modes.
Definition: argus_def.h:275
status_t Argus_EvaluateData(argus_hnd_t *hnd, argus_results_t *res)
Evaluates measurement data from the raw sensor readout data.
status_t print(const char *fmt_s,...)
A printf-like function to print formatted data to an debugging interface.
Definition: sci_log.c:106
static void PrintDeviceInfo(argus_hnd_t *device)
Prints information about the initialized devices.
Definition: 01_simple_example.c:180
const char * Argus_GetModuleName(argus_hnd_t *hnd)
Gets the name string of the module.
@ ARGUS_MODE_HIGH_SPEED_SHORT_RANGE
Definition: argus_def.h:286
status_t Argus_InitMode(argus_hnd_t *hnd, s2pi_slave_t spi_slave, argus_mode_t mode)
Initializes the device with specified measurement mode.
void IRQ_LOCK(void)
Disable IRQ Interrupts.
struct argus_hnd_t argus_hnd_t
Definition: argus_def.h:320
This file is part of the AFBR-S50 API.
status_t Argus_SetConfigurationFrameTime(argus_hnd_t *hnd, uint32_t value)
Sets the frame time to a specified device.
#define SPI_SLAVE
Definition: examples.h:103
The measurement results data structure.
Definition: argus_res.h:215
uint32_t Argus_GetChipID(argus_hnd_t *hnd)
Gets the unique identification number of the chip.
status_t MeasurementReadyCallback(status_t status, argus_hnd_t *argus)
void HandleError(status_t status, bool stop, char const *msg)
A callback function from the example code whenever an error occurs.
Definition: main.c:62
uint32_t Argus_GetAPIVersion(void)
Gets the version number of the current API library.
int main(void)
Application entry point.
Definition: main.c:48
@ ERROR_FAIL
Definition: argus_status.h:95
int32_t s2pi_slave_t
Definition: argus_api.h:67
ltc_t TimeStamp
Definition: argus_res.h:225
@ STATUS_OK
Definition: argus_status.h:80
#define Q9_22_ONE
Definition: fp_def.h:547
@ DFM_MODE_OFF
Definition: argus_dfm.h:73
void IRQ_UNLOCK(void)
Enable IRQ Interrupts.
uint32_t Time_DiffUSec(ltc_t const *t_start, ltc_t const *t_end)
Obtains the time difference between two given time points in microseconds.
Definition: time.h:282
argus_hnd_t * Argus_CreateHandle(void)
Creates a new device data handle object to store all internal states.
A data structure to represent current time.
Definition: time.h:69
status_t Argus_StartMeasurementTimer(argus_hnd_t *hnd, argus_measurement_ready_callback_t cb)
Starts the timer based measurement cycle asynchronously.
argus_results_bin_t Bin
Definition: argus_res.h:269
status_t Argus_SetConfigurationDFMMode(argus_hnd_t *hnd, argus_dfm_mode_t value)
Sets the Dual Frequency Mode (DFM) to a specified device.
static void PrintResults(argus_results_t const *res)
Prints measurement results via UART.
Definition: 01_simple_example.c:152
status_t Argus_SetConfigurationSmartPowerSaveEnabled(argus_hnd_t *hnd, bool value)
Sets the smart power save enabled flag to a specified device.
static status_t status
Definition: argus_xtalk_cal_cli.c:140
static argus_hnd_t * InitializeDevice(s2pi_slave_t slave)
Creates and initializes a new device instance.
Definition: 01_simple_example.c:60
static volatile uint8_t myDataReadyEvents
Definition: main.c:96
int32_t status_t
Type used for all status and error return values.
Definition: argus_status.h:70
q9_22_t Range
Definition: argus_res.h:75