summaryrefslogtreecommitdiff
path: root/board/careena
diff options
context:
space:
mode:
authorJonathan Brandmeyer <jbrandmeyer@chromium.org>2018-07-30 13:16:46 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-07-31 16:37:04 -0700
commit160748e02929a4fc2142b84dcd91031690420b15 (patch)
tree211476ba7044985a918123f4b47c3caa23573f9d /board/careena
parent9b4909334c5b2531e9dd08d81ca00f51ddd1a906 (diff)
downloadchrome-ec-160748e02929a4fc2142b84dcd91031690420b15.tar.gz
careena: Correct baseboard IMU orientation.
The Careena baseboard IMU principle axes are rotated relative to the Grunt reference design for manufacturability. Also, refactor common/spi_flash_reg.c to avoid a name collision with axis definitions in math_util. BRANCH=none BUG=b:111983307 TEST=make -j buldall; Observe `accelread 1` output with the base in orientations: flat, perturbed by rotation about +y, and perturbed by rotation about +x. Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Change-Id: Ib85d657ef47a89aaa63134b2bdf43920caf6c06e Reviewed-on: https://chromium-review.googlesource.com/1155628 Commit-Ready: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'board/careena')
-rw-r--r--board/careena/board.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/careena/board.c b/board/careena/board.c
index afa9c18637..1bae162930 100644
--- a/board/careena/board.c
+++ b/board/careena/board.c
@@ -124,6 +124,13 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
static void board_init(void)
{
+ /*
+ * Careena's baseboard is rotated 180 degrees about the +y axis relative
+ * to the Grunt reference design.
+ */
+ grunt_base_standard_ref[0][0] = FLOAT_TO_FP(-1);
+ grunt_base_standard_ref[2][2] = FLOAT_TO_FP(-1);
+
/* Enable Gyro interrupts */
gpio_enable_interrupt(GPIO_6AXIS_INT_L);
}