#if RUN_XTALK_CALIBRATION
#endif
{
return device;
}
{
do
{
do
{
}
HandleError(
status,
false,
"Waiting for measurement data ready (Argus_GetStatus) failed!");
}
{
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 - Simple 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);
#if RUN_XTALK_CALIBRATION
#endif
uint32_t f_cnt = 1U;
for (;;)
{
TriggerMeasurementBlocking(device, &res, &res_dbg);
}
}
int main(void)
Application entry point.
Definition main.c:48
This file is part of the AFBR-S50 API.
Provides functions with debug information printed on a cli.
Provides an interactive crosstalk calibration CLI to the AFBR-S50 API.
char const * Argus_GetModuleName(argus_hnd_t *hnd)
Gets the name string of the module.
status_t Argus_Init(argus_hnd_t *hnd, s2pi_slave_t spi_slave)
Initializes the device with default 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
uint32_t Argus_GetAPIVersion(void)
Gets the version number of the current API library.
status_t Argus_SetConfigurationFrameTime(argus_hnd_t *hnd, uint32_t value)
Sets the frame time to a specified device.
void Print_DebugResults(uint32_t frame_cnt, argus_results_t const *res)
Prints debugging measurement results via UART.
Definition argus_debug_cli.c:120
void Print_DebugHeader(void)
Prints debugging measurement header via UART.
Definition argus_debug_cli.c:59
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_TriggerMeasurement(argus_hnd_t *hnd, argus_measurement_ready_callback_t cb)
Triggers a single measurement frame asynchronously.
status_t Argus_EvaluateDataDebug(argus_hnd_t *hnd, argus_results_t *res, argus_results_debug_t *dbg)
Evaluates measurement data from the raw sensor readout data.
status_t Argus_GetStatus(argus_hnd_t *hnd)
Checks the state of the device/driver.
int32_t status_t
Type used for all status and error return values.
Definition argus_status.h:70
@ STATUS_BUSY
Definition argus_status.h:89
@ STATUS_ARGUS_POWERLIMIT
Definition argus_status.h:167
@ STATUS_OK
Definition argus_status.h:80
@ ERROR_FAIL
Definition argus_status.h:95
void Argus_XtalkCalibration_CLI(argus_hnd_t *hnd)
Interactive Xtalk Calibration Procedure CLI.
Definition argus_xtalk_cal_cli.c:162
static status_t status
Definition argus_xtalk_cal_cli.c:140
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
The debug data of measurement results data structure.
Definition argus_res.h:144
The measurement results data structure.
Definition argus_res.h:216