A Class to interface to the SMI540 over SPI. More...
#include <smi540.h>
Public Member Functions | |
ONESMI540MEAS | GetOneMeas (void) |
Polls one measurement from the SMI 530/540. | |
Smi540 () | |
Constructor initializes Sub20 device and BMA180ies. | |
~Smi540 () | |
Destructor closing all open connections. | |
Private Member Functions | |
double | mm5data_to_int (char, char, cmd540::eSensorType) |
Converts BMA180 formatted data into double. | |
Private Attributes | |
bool | bSubDeviceConfigured |
bool | bSubDeviceOpen |
sub_handle | fd |
std::string | strSerial |
A Class to interface to the SMI540 over SPI.
This class interfaces with the BOSCH SMI 530/540 over SPI using an XDIMAX Sub20 interface device.
Definition at line 65 of file smi540.h.
Smi540::Smi540 | ( | ) |
Constructor initializes Sub20 device and BMA180ies.
Detects connected Sub20 devices and SMI530/540. Initializes the Sub20 device.
Definition at line 40 of file smi540.cpp.
Smi540::~Smi540 | ( | ) |
Destructor closing all open connections.
Closes open SPI connections and disables the Sub20 device.
Definition at line 105 of file smi540.cpp.
ONESMI540MEAS Smi540::GetOneMeas | ( | void | ) |
Polls one measurement from the SMI 530/540.
Sends a measurement request to the SMI530/540 sensor and extracts x/y accel measurement, plus a z-gyro measurement
Definition at line 117 of file smi540.cpp.
double Smi540::mm5data_to_int | ( | char | chMSB, | |
char | chLSB, | |||
cmd540::eSensorType | eSensor | |||
) | [private] |
Converts BMA180 formatted data into double.
Definition at line 164 of file smi540.cpp.
bool Smi540::bSubDeviceConfigured [private] |
bool Smi540::bSubDeviceOpen [private] |
sub_handle Smi540::fd [private] |
std::string Smi540::strSerial [private] |