Arm Virtual Hardware  Version 2.1.0
AVH FVP Models
 
Loading...
Searching...
No Matches

Sensor data streaming interface. More...

Content

 Sensor Driver API Functions
 Sensor Driver API functions.
 
 Sensor Driver API Defines
 Sensor Driver API Definitions.
 

Data Structures

struct  sensorStatus_t
 Status. More...
 
struct  sensorConfig_t
 Configuration. More...
 
union  sensorConfig_t.u
 
struct  sensorConfig_t.u.fifo
 
struct  sensorConfig_t.u.dma
 

Description

Sensor data streaming interface.

VSI Sensor interface use case is implemented for Arm FVPs based on the general-purpose Virtual Streaming Interface (VSI).

The use of common sensor driver API simplifies re-targeting of the application code between virtual and physical devices. Currently sensor driver implementations are available for the following platforms:

and support for other hardware platforms can be added following the same concept.

The table below references the files that implement the sensor peripheral:

Item Description
./interface/sensor/template/sensor_config.h Sensor configuration.
./interface/sensor/include/sensor_drv.h Common Sensor Driver API header file. Used by implementations on Arm Virtual Hardware and real HW boards.
./interface/sensor/source/sensor_drv.c Common sensor driver implementation. Used in combination with hardware specific implementations.
./interface/sensor/include/sensor_drv_hw.h Hardware specific Sensor Driver API header file.
./interface/sensor/source/sensor_drv_hw.c Sensor driver implementation for Arm Virtual Hardware based on VSI.
./interface/sensor/python/arm_vsi2.py VSI Sensor Python script for sensor emulation based on VSI Python Interface.
./interface/sensor/python/vsi_sensor.py VSI Sensor Python module for sensor interface.
Hardware specific sensor driver for ST Microelectronics B-U585I-IOT02A Discovery kit for IoT Hardware specific sensor driver implementation for ST Microelectronics B-U585I-IOT02A Discovery kit for IoT. See SDS-Framework GitHub repo.

Data Structure Documentation

◆ sensorStatus_t

struct sensorStatus_t

Status.

Structure with information about the sensor status. The data fields encode active and buffer state flags.

Returned by:

Data Fields
uint32_t active: 1 Active state: 1=enabled(active), 0=disabled(inactive)
uint32_t overflow: 1 Overflow flag (cleared on sensorGetStatus)
uint32_t reserved: 30

◆ sensorConfig_t

struct sensorConfig_t

Configuration.

Structure with sensor configuration parameters.

Returned by:

Data Fields
char * name Sensor name.
uint32_t dma_mode DMA mode: 1=DMA, 0=non-DMA (FIFO)
uint32_t sample_size Sample size in bytes.
union sensorConfig_t.u u Union with FIFO and DMA configuration structures.

◆ sensorConfig_t.u

union sensorConfig_t.u
Data Fields
struct sensorConfig_t.u.fifo fifo Structure with FIFO configuration.
struct sensorConfig_t.u.dma dma Structure with DMA configuration.

◆ sensorConfig_t.u.fifo

struct sensorConfig_t.u.fifo
Data Fields
uint32_t sample_interval Sample interval in microseconds.
uint32_t fifo_size Sample FIFO size in bytes.
uint32_t data_threshold Data event threshold in number of samples.

◆ sensorConfig_t.u.dma

struct sensorConfig_t.u.dma
Data Fields
uint32_t block_interval Block interval in microseconds.
uint32_t block_size Block size in bytes.
uint32_t block_num Number of blocks.