diff options
Diffstat (limited to 'board/brya/board.h')
-rw-r--r-- | board/brya/board.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/board/brya/board.h b/board/brya/board.h index 80c3fc04a3..7bbd19a6f5 100644 --- a/board/brya/board.h +++ b/board/brya/board.h @@ -33,6 +33,34 @@ #define CONFIG_LED_PWM_SOC_SUSPEND_COLOR EC_LED_COLOR_WHITE #define CONFIG_LED_PWM_LOW_BATT_COLOR EC_LED_COLOR_AMBER +/* Sensors */ +#define CONFIG_ACCELGYRO_LSM6DSO /* Base accel */ +#define CONFIG_ACCEL_LSM6DSO_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) + +/* Enable sensor fifo, must also define the _SIZE and _THRES */ +#define CONFIG_ACCEL_FIFO +/* FIFO size is in power of 2. */ +#define CONFIG_ACCEL_FIFO_SIZE 256 +/* Depends on how fast the AP boots and typical ODRs */ +#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO_SIZE / 3) + +/* Sensors without hardware FIFO are in forced mode */ +#define CONFIG_ACCEL_FORCE_MODE_MASK \ + (BIT(LID_ACCEL)) + +/* Lid accel */ +#define CONFIG_ACCEL_LIS2DWL +#define CONFIG_ACCEL_LIS2DW_AS_BASE +#define CONFIG_ACCEL_LIS2DW12_INT_EVENT \ + TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL) + +#define CONFIG_ACCEL_INTERRUPTS + +/* Sensor console commands */ +#define CONFIG_CMD_ACCELS +#define CONFIG_CMD_ACCEL_INFO + /* USB Type A Features */ #define USB_PORT_COUNT 1 #define CONFIG_USB_PORT_POWER_DUMB @@ -174,6 +202,13 @@ enum temp_sensor_id { TEMP_SENSOR_COUNT }; +enum sensor_id { + LID_ACCEL = 0, + BASE_ACCEL, + BASE_GYRO, + SENSOR_COUNT +}; + enum ioex_port { IOEX_C0_NCT38XX = 0, IOEX_C2_NCT38XX, |