base program for tilt measurement
Dependencies: COG4050_ADT7420 ADXL362
Fork of COG4050_adxl355_adxl357-ver2 by
Diff: ADXL35x/ADXL355.cpp
- Revision:
- 4:23b53636b576
- Parent:
- 3:ee052fdb4331
- Child:
- 6:45d2393ef468
diff -r ee052fdb4331 -r 23b53636b576 ADXL35x/ADXL355.cpp --- a/ADXL35x/ADXL355.cpp Wed Aug 08 08:56:00 2018 +0000 +++ b/ADXL35x/ADXL355.cpp Wed Aug 08 11:57:16 2018 +0000 @@ -76,7 +76,7 @@ uint32_t ret_val = 0; adxl355.format(8, _SPI_MODE); cs = false; - adxl355.write(static_cast<uint8_t>(reg<<1) | _READ_REG_CMD); + adxl355.write((reg<<1) | _READ_REG_CMD); ret_val = adxl355.write(_DUMMY_BYTE); ret_val = (ret_val<<8) | adxl355.write(_DUMMY_BYTE); ret_val = (ret_val<<8) | adxl355.write(_DUMMY_BYTE);