Skyward boardcore
|
Driver class for VN100 Spi IMU. More...
#include <VN100Spi.h>
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]. | |
![]() | |
Sensor () | |
Sensor (Sensor &&other) | |
virtual | ~Sensor () |
void | sample () override |
Sample the sensor. | |
virtual VN100SpiData | getLastSample () |
![]() | |
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 | |
![]() | |
using | DataType |
![]() | |
DataType | lastSample |
miosix::FastMutex | mutex |
![]() | |
SensorErrors | lastError = SensorErrors::NO_ERRORS |
Driver class for VN100 Spi IMU.
Definition at line 54 of file VN100Spi.h.
Boardcore::VN100Spi::VN100Spi | ( | SPIBus & | bus, |
miosix::GpioPin | csPin, | ||
SPIBusConfig | busConfiguration, | ||
uint16_t | syncOutSkipFactor ) |
VN100 constructor.
bus | SPI bus. |
csPin | SPI chip select pin. |
busConfiguration | SPI bus configuration. |
syncOutSkipFactor | The 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.
PressureData Boardcore::VN100Spi::getPressure | ( | ) |
Retrieve pressure data from the sensor [kPa].
Definition at line 248 of file VN100Spi.cpp.
TemperatureData Boardcore::VN100Spi::getTemperature | ( | ) |
Retrieve temperature data from the sensor [°C].
Definition at line 222 of file VN100Spi.cpp.
|
overridevirtual |
Initialize the sensor.
Implements Boardcore::AbstractSensor.
Definition at line 39 of file VN100Spi.cpp.
|
overrideprotectedvirtual |
Gather data from the sensor.
Implements Boardcore::Sensor< VN100SpiData >.
Definition at line 166 of file VN100Spi.cpp.
|
overridevirtual |
Performs self test for the sensor.
Implements Boardcore::AbstractSensor.
Definition at line 164 of file VN100Spi.cpp.