Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: ECE4180FinalProjectFall22
Diff: ens160_i2c.h
- Revision:
- 4:cb50c2f7e2b2
- Parent:
- 3:63ff52373e71
--- a/ens160_i2c.h Tue Dec 06 21:21:28 2022 +0000
+++ b/ens160_i2c.h Thu Dec 08 16:39:40 2022 +0000
@@ -10,7 +10,6 @@
uint8_t i2c_address;
I2C i2c;
ENS160(PinName sda, PinName scl, uint8_t i2c_device_address);
- bool ping(uint8_t address);
///////////////////////////////////////////////////////////////////////
// init()
@@ -36,8 +35,8 @@
// length Length of the data being written in bytes
// retval -1 = error, 0 = success
- int32_t writeRegisterRegion(uint8_t *data, uint8_t length);
- int32_t writeRegisterRegion(uint8_t reg, uint8_t data);
+ int32_t writeRegisterRegion(char *data, uint8_t length);
+ int32_t writeRegisterRegion(uint8_t reg, char data);
//////////////////////////////////////////////////////////////////////////////////
// readRegisterRegion()
@@ -47,8 +46,8 @@
// data Array to store data in
// length Length of the data to read in bytes
// retval -1 = error, 0 = success
-
- uint8_t readRegisterRegion(uint8_t reg, uint8_t *data, uint8_t length);
+ int32_t readRegisterRegion(uint8_t reg, char *data);
+ int32_t readRegisterRegion(uint8_t reg, char *data, uint8_t length);
//////////////////////////////////////////////////////////////////////////////////
// General Operation
