MetaWear C++ API  0.18.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,
20 
37 
43 METAWEAR_API float mbl_mw_acc_set_odr(MblMwMetaWearBoard *board, float odr);
49 METAWEAR_API float mbl_mw_acc_set_range(MblMwMetaWearBoard *board, float range);
61 METAWEAR_API void mbl_mw_acc_read_config(const MblMwMetaWearBoard* board, void *context, MblMwFnBoardPtrInt completed);
62 
73 
84 
85 #ifdef __cplusplus
86 }
87 #endif
const uint8_t MBL_MW_ACC_ACCEL_Y_AXIS_INDEX
Indices for component values of the acceleration data signal, used with mbl_mw_datasignal_get_compone...
Definition: accelerometer.h:17
struct MblMwMetaWearBoard MblMwMetaWearBoard
Software representation of a physical MetaWear board.
Definition: metawearboard_fwd.h:17
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.
const uint8_t MBL_MW_ACC_ACCEL_Z_AXIS_INDEX
Indices for component values of the acceleration data signal, used with mbl_mw_datasignal_get_compone...
Definition: accelerometer.h:18
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 void mbl_mw_acc_write_acceleration_config(const MblMwMetaWearBoard *board)
Writes the acceleration settings to the board.
METAWEAR_API float mbl_mw_acc_set_range(MblMwMetaWearBoard *board, float range)
Sets the full scale range.
METAWEAR_API float mbl_mw_acc_set_odr(MblMwMetaWearBoard *board, float odr)
Sets the output data rate.
METAWEAR_API MblMwDataSignal * mbl_mw_acc_get_high_freq_acceleration_data_signal(const MblMwMetaWearBoard *board)
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 MblMwDataSignal * mbl_mw_acc_get_acceleration_data_signal(const MblMwMetaWearBoard *board)
Retrieves the data signal representing acceleration data.
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
METAWEAR_API void mbl_mw_acc_enable_acceleration_sampling(const MblMwMetaWearBoard *board)
Enables acceleration sampling.
METAWEAR_API void mbl_mw_acc_disable_acceleration_sampling(const MblMwMetaWearBoard *board)
Disables acceleration sampling.
METAWEAR_API void mbl_mw_acc_stop(const MblMwMetaWearBoard *board)
Switches the accelerometer to standby mode.
METAWEAR_API void mbl_mw_acc_start(const MblMwMetaWearBoard *board)
Switches the accelerometer to active mode.
#define METAWEAR_API
Indicates the function should be exported to the symbol table.
Definition: dllmarker.h:27
struct MblMwDataSignal MblMwDataSignal
A event fired from the MetaWear board that also contains data.
Definition: datasignal_fwd.h:15