An improved version of mbed's I2C class.
Dependents: acd52832_Humidity_Temp_Example BB acnSensa_LIS aconnoCellularGnss ... more
Diff: aconno_i2c.cpp
- Revision:
- 7:b2f0c302ba6d
- Parent:
- 6:4d1b387c12c3
--- a/aconno_i2c.cpp Thu Jul 19 15:07:28 2018 +0200
+++ b/aconno_i2c.cpp Thu Jul 19 15:17:28 2018 +0200
@@ -19,6 +19,15 @@
i2cAddress = address;
}
+/**
+ * Method for changing specific bits within register
+ * @param regAddress: 8bit address
+ * @param regSize: register size in B
+ * @param newValue new value for [numOfBits] bits within the register
+ * @param numOfBits sizeof[newValue] in b
+ * @param offset newValue offset within the register
+ * @return returns new value of the register
+ */
uint16_t aconno_i2c::changeRegBits(char regAddress, uint8_t regSize,
uint16_t newValue, uint16_t numOfBits, uint16_t offset)
{