MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
accelerometer.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 
15 
16 const uint8_t MBL_MW_ACC_ACCEL_X_AXIS_INDEX = 0,
17  MBL_MW_ACC_ACCEL_Y_AXIS_INDEX = 1,
18  MBL_MW_ACC_ACCEL_Z_AXIS_INDEX = 2;
20 
69 METAWEAR_API void mbl_mw_acc_read_config(const MblMwMetaWearBoard* board, void *context, MblMwFnBoardPtrInt completed);
92 
93 #ifdef __cplusplus
94 }
95 #endif
METAWEAR_API void mbl_mw_acc_start(const MblMwMetaWearBoard *board)
Switches the accelerometer to active mode.
METAWEAR_API float mbl_mw_acc_set_range(MblMwMetaWearBoard *board, float range)
Sets the full scale range.
METAWEAR_API void mbl_mw_acc_enable_acceleration_sampling(const MblMwMetaWearBoard *board)
Enables acceleration sampling The board will start gathering data from the accelerometer.
METAWEAR_API float mbl_mw_acc_set_odr(MblMwMetaWearBoard *board, float odr)
Sets the output data rate.
METAWEAR_API void mbl_mw_acc_write_acceleration_config(const MblMwMetaWearBoard *board)
Writes the acceleration settings to the board Applies the ODR and RANGE values set in set_range() and...
METAWEAR_API MblMwDataSignal * mbl_mw_acc_get_high_freq_acceleration_data_signal(const MblMwMetaWearBoard *board)
METAWEAR_API MblMwDataSignal * mbl_mw_acc_get_packed_acceleration_data_signal(const MblMwMetaWearBoard *board)
Variant of acceleration data that packs multiple data samples into 1 BLE packet to increase the data ...
METAWEAR_API MblMwDataSignal * mbl_mw_acc_get_acceleration_data_signal(const MblMwMetaWearBoard *board)
Retrieves the data signal representing acceleration data This signal is timestamp,...
const uint8_t MBL_MW_ACC_ACCEL_X_AXIS_INDEX
Indices for component values of the acceleration data signal, used with mbl_mw_datasignal_get_compone...
Definition: accelerometer.h:16
METAWEAR_API void mbl_mw_acc_disable_acceleration_sampling(const MblMwMetaWearBoard *board)
Disables acceleration sampling The board will stop gathering data from the accelerometer.
METAWEAR_API void mbl_mw_acc_read_config(const MblMwMetaWearBoard *board, void *context, MblMwFnBoardPtrInt completed)
Pulls the current accelerometer output data rate and data range from the sensor Reads the ODR and RAN...
METAWEAR_API void mbl_mw_acc_stop(const MblMwMetaWearBoard *board)
Switches the accelerometer to standby mode.
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
struct MblMwMetaWearBoard MblMwMetaWearBoard
Software representation of a physical MetaWear board.
Definition: metawearboard_fwd.h:17
void(* MblMwFnBoardPtrInt)(void *context, MblMwMetaWearBoard *board, int32_t value)
Definition for callback functions that accept an MblMwMetaWearBoard pointer and an int32.
Definition: metawearboard_fwd.h:26