Skyward boardcore
|
#include <BMX160.h>
Public Types | |
enum | BMX160Errors : uint8_t { INVALID_FIFO_DATA } |
BMX160 Custom errors. More... | |
![]() | |
using | DataType = Data |
Public Member Functions | |
BMX160 (SPIBusInterface &bus, miosix::GpioPin cs, BMX160Config config={}) | |
BMX160 Constructor. | |
BMX160 (SPIBusInterface &bus, miosix::GpioPin cs, BMX160Config config, SPIBusConfig busConfig) | |
BMX160 Constructor. | |
bool | init () override |
Initialize the driver. | |
bool | selfTest () override |
Perform selftest on the device. | |
BMX160Data | sampleImpl () override |
Gather data from FIFO/data registers and temperature sensor. | |
BMX160Temperature | getTemperature () |
Get last read temperature. | |
BMX160FifoStats | getFifoStats () |
Retrieve last fifo stats. | |
void | IRQupdateTimestamp (uint64_t ts) override |
Sometimes the sensor pulls down the interrupt pin while reading data. We override this method and update the timestamps only if we are not still reading the fifo (. | |
![]() | |
SensorFIFO () | |
SensorFIFO (SensorFIFO &&other) | |
const std::array< BMX160Data, FifoSize > | getLastFifo (uint16_t &lastFifoSize) |
![]() | |
Sensor () | |
Sensor (Sensor &&other) | |
virtual | ~Sensor () |
void | sample () override |
Sample the sensor. | |
virtual Data | getLastSample () |
![]() | |
virtual | ~AbstractSensor () |
SensorErrors | getLastError () |
Get last error for debugging purposes. Avoid silent fails. | |
Additional Inherited Members | |
![]() | |
std::array< BMX160Data, FifoSize > | lastFifo |
uint16_t | lastFifoLevel |
uint64_t | lastInterruptTimestamp |
uint64_t | interruptTimestampDelta |
![]() | |
DataType | lastSample |
miosix::FastMutex | mutex |
![]() | |
SensorErrors | lastError = SensorErrors::NO_ERRORS |
enum Boardcore::BMX160::BMX160Errors : uint8_t |
Boardcore::BMX160::BMX160 | ( | SPIBusInterface & | bus, |
miosix::GpioPin | cs, | ||
BMX160Config | config = {} ) |
Boardcore::BMX160::BMX160 | ( | SPIBusInterface & | bus, |
miosix::GpioPin | cs, | ||
BMX160Config | config, | ||
SPIBusConfig | busConfig ) |
BMX160FifoStats Boardcore::BMX160::getFifoStats | ( | ) |
Retrieve last fifo stats.
Definition at line 169 of file BMX160.cpp.
BMX160Temperature Boardcore::BMX160::getTemperature | ( | ) |
Get last read temperature.
Definition at line 161 of file BMX160.cpp.
|
overridevirtual |
Initialize the driver.
Implements Boardcore::AbstractSensor.
Definition at line 49 of file BMX160.cpp.
|
overridevirtual |
Sometimes the sensor pulls down the interrupt pin while reading data. We override this method and update the timestamps only if we are not still reading the fifo (.
Reimplemented from Boardcore::SensorFIFO< BMX160Data, BMX160Defs::FIFO_SIZE >.
Definition at line 105 of file BMX160.cpp.
|
overridevirtual |
Gather data from FIFO/data registers and temperature sensor.
Implements Boardcore::Sensor< Data >.
Definition at line 112 of file BMX160.cpp.
|
overridevirtual |
Perform selftest on the device.
Implements Boardcore::AbstractSensor.
Definition at line 84 of file BMX160.cpp.