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.
Revision 4:d141a3e5531e, committed 2021-04-04
- Comitter:
- renanbmx123
- Date:
- Sun Apr 04 14:37:39 2021 +0000
- Parent:
- 3:3613e9a0edb1
- Commit message:
- Refatorando para o mbed-os 6
Changed in this revision
| ALTIMU.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ALTIMU.cpp Tue Nov 06 16:41:50 2018 +0000
+++ b/ALTIMU.cpp Sun Apr 04 14:37:39 2021 +0000
@@ -80,9 +80,10 @@
// Write a byte in a register address.
bool Altimu::write_reg(int addr_i2c,int addr_reg, char v)
{
- char data[2] = {addr_reg, v}; //
+ uint8_t data[2] = {(uint8_t)addr_reg, (uint8_t)v}; //
// return boolean value of write operation, if fails return 0, else 1.
- return Altimu::_ALTIMU.write(addr_i2c, data, 2) == 0;
+ //write (int address, const char *data, int length, bool repeated=false)
+ return Altimu::_ALTIMU.write(addr_i2c, (char *)data, 2) == 0;
}
// Read a byte from register
bool Altimu::read_reg(int addr_i2c,int addr_reg, char *v)