MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
i2c.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "sensor_common.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
18 typedef struct {
19  uint8_t device_addr;
20  uint8_t register_addr;
22 
40 METAWEAR_API void mbl_mw_i2c_write(const MblMwMetaWearBoard *board, uint8_t device_addr, uint8_t register_addr, const uint8_t* value, uint8_t length);
41 
42 #ifdef __cplusplus
43 }
44 #endif
struct MblMwDataSignal MblMwDataSignal
A event fired from the MetaWear board that also contains data.
Definition: datasignal_fwd.h:15
#define METAWEAR_API
Indicates the function should be exported to the symbol table
Definition: dllmarker.h:27
METAWEAR_API void mbl_mw_i2c_write(const MblMwMetaWearBoard *board, uint8_t device_addr, uint8_t register_addr, const uint8_t *value, uint8_t length)
Writes data via the i2c bus.
METAWEAR_API MblMwDataSignal * mbl_mw_i2c_get_data_signal(MblMwMetaWearBoard *board, uint8_t length, uint8_t id)
Retrieves the data signal representing i2c data The data signal is identified by the id value and if ...
struct MblMwMetaWearBoard MblMwMetaWearBoard
Software representation of a physical MetaWear board.
Definition: metawearboard_fwd.h:17
Parameters required for an i2c read.
Definition: i2c.h:18
uint8_t register_addr
Register to read from.
Definition: i2c.h:20
uint8_t device_addr
Device to communicate with.
Definition: i2c.h:19