mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
i2c: use mraa 1.0 types for i2c sensors
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:

committed by
Noel Eck

parent
e51c5f3018
commit
48d5426350
@ -80,7 +80,11 @@ bool MMA7660::writeByte(uint8_t reg, uint8_t byte)
|
||||
|
||||
uint8_t MMA7660::readByte(uint8_t reg)
|
||||
{
|
||||
return mraa_i2c_read_byte_data(m_i2c, reg);
|
||||
int x = mraa_i2c_read_byte_data(m_i2c, reg);
|
||||
if (x != -1) {
|
||||
return (uint8_t) x;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MMA7660::getRawValues(int *x, int *y, int *z)
|
||||
|
Reference in New Issue
Block a user