MetaWear C++ API
0.18.0
C++ implementation of the MetaWear protocol
|
Communicates with sensors on the SPI bus. More...
#include "sensor_common.h"
Go to the source code of this file.
Classes | |
struct | MblMwSpiParameters |
Parameters required for an SPI operation. More... | |
Enumerations | |
enum | MblMwSpiFrequency { MBL_MW_SPI_FREQUENCY_125KHz = 0, MBL_MW_SPI_FREQUENCY_250KHz, MBL_MW_SPI_FREQUENCY_500KHz, MBL_MW_SPI_FREQUENCY_1MHz, MBL_MW_SPI_FREQUENCY_2MHz, MBL_MW_SPI_FREQUENCY_4MHz, MBL_MW_SPI_FREQUENCY_8MHz } |
Available SPI clock frequencies. | |
enum | MblMwSpiMode { MBL_MW_SPI_MODE_0 = 0, MBL_MW_SPI_MODE_1, MBL_MW_SPI_MODE_2, MBL_MW_SPI_MODE_3 } |
Available SPI modes, see SPI Wiki page for further details. More... | |
Functions | |
METAWEAR_API MblMwDataSignal * | mbl_mw_spi_get_data_signal (MblMwMetaWearBoard *board, uint8_t length, uint8_t id) |
Retrieves the data signal representing spi data. More... | |
METAWEAR_API void | mbl_mw_spi_write (const MblMwMetaWearBoard *board, const MblMwSpiParameters *parameters) |
Writes data via the spi bus. More... | |
Communicates with sensors on the SPI bus.
enum MblMwSpiMode |
Available SPI modes, see SPI Wiki page for further details.
METAWEAR_API MblMwDataSignal* mbl_mw_spi_get_data_signal | ( | MblMwMetaWearBoard * | board, |
uint8_t | length, | ||
uint8_t | id | ||
) |
Retrieves the data signal representing spi data.
The data signal is identified by the id value and if the id is not present, a new data signal will be created using the length parameter.
board | Board to communicate with |
length | Number of bytes to read |
id | Numerical id identifying the data |
METAWEAR_API void mbl_mw_spi_write | ( | const MblMwMetaWearBoard * | board, |
const MblMwSpiParameters * | parameters | ||
) |
Writes data via the spi bus.
board | Board to communicate with |
parameters | Parameters configuring the read |