MetaWear C++ API
0.18.0
C++ implementation of the MetaWear protocol
|
Interacts with various temperature sources. More...
#include "sensor_common.h"
Go to the source code of this file.
Enumerations | |
enum | MblMwTemperatureSource { MBL_MW_TEMPERATURE_SOURCE_INVALID = -1, MBL_MW_TEMPERATURE_SOURCE_NRF_DIE = 0, MBL_MW_TEMPERATURE_SOURCE_EXT_THERM, MBL_MW_TEMPERATURE_SOURCE_BMP280, MBL_MW_TEMPERATURE_SOURCE_PRESET_THERM } |
Enumeration of the available temperature sourcs. More... | |
enum | MblMwMetaWearRChannel { MBL_MW_METAWEAR_R_CHANNEL_ON_DIE = 0, MBL_MW_METAWEAR_R_CHANNEL_EXT_THERMISTOR } |
Channel IDs for the temperature sources on the MetaWear R board. More... | |
enum | MblMwMetaWearRProChannel { MBL_MW_METAWEAR_RPRO_CHANNEL_ON_DIE = 0, MBL_MW_METAWEAR_RPRO_CHANNEL_ON_BOARD_THERMISTOR, MBL_MW_METAWEAR_RPRO_CHANNEL_EXT_THERMISTOR, MBL_MW_METAWEAR_RPRO_CHANNEL_BMP280 } |
CHannel IDs for the temperature sources on the MetaWear RPro board. More... | |
Functions | |
METAWEAR_API MblMwDataSignal * | mbl_mw_multi_chnl_temp_get_temperature_data_signal (const MblMwMetaWearBoard *board, uint8_t channel) |
Retrieves the data signal representing a temperature source. More... | |
METAWEAR_API void | mbl_mw_multi_chnl_temp_configure_ext_thermistor (const MblMwMetaWearBoard *board, uint8_t channel, uint8_t data_pin, uint8_t pulldown_pin, uint8_t active_high) |
Configure the external thermistor. More... | |
METAWEAR_API MblMwTemperatureSource | mbl_mw_multi_chnl_temp_get_source (const MblMwMetaWearBoard *board, uint8_t channel) |
Retrieve the temperature source type corresponding to a channel ID. More... | |
METAWEAR_API uint8_t | mbl_mw_multi_chnl_temp_get_num_channels (const MblMwMetaWearBoard *board) |
Retrieve the number of available channels. More... | |
Interacts with various temperature sources.
The functions in the file only work for boards running firmware v1.0.4 or higher
CHannel IDs for the temperature sources on the MetaWear RPro board.
Enumeration of the available temperature sourcs.
Note that not all sources are present on all boards
METAWEAR_API void mbl_mw_multi_chnl_temp_configure_ext_thermistor | ( | const MblMwMetaWearBoard * | board, |
uint8_t | channel, | ||
uint8_t | data_pin, | ||
uint8_t | pulldown_pin, | ||
uint8_t | active_high | ||
) |
Configure the external thermistor.
board | Board the external thermistor is attached to |
channel | Channel ID of the external thermistor |
data_pin | GPIO pin reading the data |
pulldown_pin | GPIO pin the pulldown resistor is connected to |
active_high | Zero if the pulldown pin is not active high, non-zero if active high |
METAWEAR_API uint8_t mbl_mw_multi_chnl_temp_get_num_channels | ( | const MblMwMetaWearBoard * | board | ) |
Retrieve the number of available channels.
METAWEAR_API MblMwTemperatureSource mbl_mw_multi_chnl_temp_get_source | ( | const MblMwMetaWearBoard * | board, |
uint8_t | channel | ||
) |
Retrieve the temperature source type corresponding to a channel ID.
board | Board to lookup the temperature source on |
channel | Channel ID to lookup |
METAWEAR_API MblMwDataSignal* mbl_mw_multi_chnl_temp_get_temperature_data_signal | ( | const MblMwMetaWearBoard * | board, |
uint8_t | channel | ||
) |
Retrieves the data signal representing a temperature source.
board | Board to retrieve the signal from |
channel | Channel ID of the temperature source |