mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
motion_sense: Move angle calculation under LPC_MODE
When LPC mode is used, there is an assumption that the first 2 sensors are accelerometers, and the optional 3rd is a gyro. Put the code that fill lpc_data with #ifdef. Prevent lpc space corruption if more than 3 sensors are present. BRANCH=smaug TEST=Compile. Smaug works BUG=None Change-Id: I12c9b823efb57d7b190a1813228f6f02fa0bebcb Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/290073
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
0085573ff4
commit
e2f233faaf
@@ -90,7 +90,10 @@
|
||||
/* Unused 0x84 - 0x8f */
|
||||
#define EC_MEMMAP_ACC_STATUS 0x90 /* Accelerometer status (8 bits )*/
|
||||
/* Unused 0x91 */
|
||||
#define EC_MEMMAP_ACC_DATA 0x92 /* Accelerometer data 0x92 - 0x9f */
|
||||
#define EC_MEMMAP_ACC_DATA 0x92 /* Accelerometers data 0x92 - 0x9f */
|
||||
/* 0x92: Lid Angle if available, LID_ANGLE_UNRELIABLE otherwise */
|
||||
/* 0x94 - 0x99: 1st Accelerometer */
|
||||
/* 0x9a - 0x9f: 2nd Accelerometer */
|
||||
#define EC_MEMMAP_GYRO_DATA 0xa0 /* Gyroscope data 0xa0 - 0xa5 */
|
||||
/* Unused 0xa6 - 0xdf */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user