#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();
PrintDeviceInfo(device);
for (;;)
{
{
PrintResults(&res);
}
}
}
int main(void)
Application entry point.
Definition main.c:48
This file is part of the AFBR-S50 API.
status_t MeasurementReadyCallback(status_t status, argus_hnd_t *argus)
char const * Argus_GetModuleName(argus_hnd_t *hnd)
Gets the name string of the module.
status_t Argus_InitMode(argus_hnd_t *hnd, s2pi_slave_t spi_slave, argus_mode_t mode)
Initializes the device with specified measurement mode.
uint32_t Argus_GetChipID(argus_hnd_t *hnd)
Gets the unique identification number of the chip.
argus_hnd_t * Argus_CreateHandle(void)
Creates a new device data handle object to store all internal states.
struct argus_hnd_t argus_hnd_t
Definition argus_def.h:284
int32_t s2pi_slave_t
Definition argus_api.h:67
argus_mode_t
The measurement modes.
Definition argus_def.h:264
uint32_t Argus_GetAPIVersion(void)
Gets the version number of the current API library.
@ ARGUS_MODE_HIGH_SPEED_SHORT_RANGE
Definition argus_def.h:274
status_t Argus_SetConfigurationDFMMode(argus_hnd_t *hnd, argus_dfm_mode_t value)
Sets the Dual Frequency Mode (DFM) to a specified device.
status_t Argus_SetConfigurationFrameTime(argus_hnd_t *hnd, uint32_t value)
Sets the frame time to a specified device.
status_t Argus_SetConfigurationSmartPowerSaveEnabled(argus_hnd_t *hnd, bool value)
Sets the smart power save enabled flag to a specified device.
@ DFM_MODE_OFF
Definition argus_dfm.h:73
#define Q9_22_ONE
Definition fp_def.h:547
void IRQ_UNLOCK(void)
Enable IRQ Interrupts.
void IRQ_LOCK(void)
Disable IRQ Interrupts.
status_t print(const char *fmt_s,...)
A printf-like function to print formatted data to an debugging interface.
Definition sci_log.c:106
status_t Argus_EvaluateData(argus_hnd_t *hnd, argus_results_t *res)
Evaluates measurement data from the raw sensor readout data.
status_t Argus_StartMeasurementTimer(argus_hnd_t *hnd, argus_measurement_ready_callback_t cb)
Starts the timer based measurement cycle asynchronously.
int32_t status_t
Type used for all status and error return values.
Definition argus_status.h:70
@ STATUS_OK
Definition argus_status.h:80
@ ERROR_FAIL
Definition argus_status.h:95
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
static status_t status
Definition argus_xtalk_cal_cli.c:140
static volatile uint8_t myDataReadyEvents
Definition main.c:96
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
#define SPI_SLAVE
Definition examples.h:102
q9_22_t Range
Definition argus_res.h:75
The measurement results data structure.
Definition argus_res.h:216
ltc_t TimeStamp
Definition argus_res.h:225
argus_results_bin_t Bin
Definition argus_res.h:269
A data structure to represent current time.
Definition time.h:70