Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::VN100Spi Class Reference

Driver class for VN100 Spi IMU. More...

#include <VN100Spi.h>

Inheritance diagram for Boardcore::VN100Spi:
Collaboration diagram for Boardcore::VN100Spi:

Public Member Functions

 VN100Spi (SPIBus &bus, miosix::GpioPin csPin, SPIBusConfig busConfiguration, uint16_t syncOutSkipFactor)
 VN100 constructor.
 
bool init () override
 Initialize the sensor.
 
bool selfTest () override
 Performs self test for the sensor.
 
TemperatureData getTemperature ()
 Retrieve temperature data from the sensor [°C].
 
PressureData getPressure ()
 Retrieve pressure data from the sensor [kPa].
 
- Public Member Functions inherited from Boardcore::Sensor< VN100SpiData >
 Sensor ()
 
 Sensor (Sensor &&other)
 
virtual ~Sensor ()
 
void sample () override
 Sample the sensor.
 
virtual VN100SpiData getLastSample ()
 
- Public Member Functions inherited from Boardcore::AbstractSensor
virtual ~AbstractSensor ()
 
SensorErrors getLastError ()
 Get last error for debugging purposes. Avoid silent fails.
 

Protected Member Functions

VN100SpiData sampleImpl () override
 Gather data from the sensor.
 

Additional Inherited Members

- Public Types inherited from Boardcore::Sensor< VN100SpiData >
using DataType
 
- Protected Attributes inherited from Boardcore::Sensor< VN100SpiData >
DataType lastSample
 
miosix::FastMutex mutex
 
- Protected Attributes inherited from Boardcore::AbstractSensor
SensorErrors lastError = SensorErrors::NO_ERRORS
 

Detailed Description

Driver class for VN100 Spi IMU.

Definition at line 54 of file VN100Spi.h.

Constructor & Destructor Documentation

◆ VN100Spi()

Boardcore::VN100Spi::VN100Spi ( SPIBus & bus,
miosix::GpioPin csPin,
SPIBusConfig busConfiguration,
uint16_t syncOutSkipFactor )

VN100 constructor.

Parameters
busSPI bus.
csPinSPI chip select pin.
busConfigurationSPI bus configuration.
syncOutSkipFactorThe SyncOutSkipFactor defines how many times the data ready event should be skipped before actually triggering the interrupt pin.

Definition at line 32 of file VN100Spi.cpp.

Member Function Documentation

◆ getPressure()

PressureData Boardcore::VN100Spi::getPressure ( )

Retrieve pressure data from the sensor [kPa].

Definition at line 248 of file VN100Spi.cpp.

◆ getTemperature()

TemperatureData Boardcore::VN100Spi::getTemperature ( )

Retrieve temperature data from the sensor [°C].

Definition at line 222 of file VN100Spi.cpp.

◆ init()

bool Boardcore::VN100Spi::init ( )
overridevirtual

Initialize the sensor.

Implements Boardcore::AbstractSensor.

Definition at line 39 of file VN100Spi.cpp.

◆ sampleImpl()

VN100SpiData Boardcore::VN100Spi::sampleImpl ( )
overrideprotectedvirtual

Gather data from the sensor.

Implements Boardcore::Sensor< VN100SpiData >.

Definition at line 166 of file VN100Spi.cpp.

◆ selfTest()

bool Boardcore::VN100Spi::selfTest ( )
overridevirtual

Performs self test for the sensor.

Returns
Return true if the test was successful.

Implements Boardcore::AbstractSensor.

Definition at line 164 of file VN100Spi.cpp.


The documentation for this class was generated from the following files: