A multifunctional and modular Firmware for Multitech's mDot based on ARM mBed provides a widerange of functionality for several Sensors such as MAX44009, BME280, MPU9250, SI1143 and uBlox. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.
Dependencies: mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed
I2C_RT Class Reference
Controls the I2C device of the mDot. More...
#include <I2C_RT.h>
Public Member Functions | |
void | read_RT (uint8_t address, uint16_t reg, bool twoBytes, uint8_t *readData, uint8_t dataLength) |
Reads data from a specific register. | |
void | write_RT (uint8_t address, uint16_t reg, bool twoBytes, uint8_t *dataToWrite, uint8_t dataLenght) |
Write data to a specific register. |
Detailed Description
Controls the I2C device of the mDot.
mbed::I2C functionality is wrapped inside it's methods. It's possible to wrap other I2C functionality from different Libraries or write an own implementation.
Definition at line 21 of file I2C_RT.h.
Member Function Documentation
void read_RT | ( | uint8_t | address, |
uint16_t | reg, | ||
bool | twoBytes, | ||
uint8_t * | readData, | ||
uint8_t | dataLength | ||
) |
Reads data from a specific register.
- Parameters:
-
address address of the I2C Slave device reg register from which the data has to be read twoBytes defines if two Bytes at once has to be read readData storage for the read Data dataLength length of the storage in bytes
Definition at line 19 of file I2C_RT.cpp.
void write_RT | ( | uint8_t | address, |
uint16_t | reg, | ||
bool | twoBytes, | ||
uint8_t * | dataToWrite, | ||
uint8_t | dataLenght | ||
) |
Write data to a specific register.
- Parameters:
-
address address of the I2C Slave device reg register where the data has to be write twoBytes defines if two bytes at once has to be write dataToWrite the actual data that has to be written dataLenght the length of the data in bytes
Definition at line 40 of file I2C_RT.cpp.
Generated on Tue Jul 12 2022 21:35:27 by 1.7.2