1 /* 2 * Copyright (c) 2024 Google LLC 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6 #ifndef ZEPHYR_DRIVERS_SENSOR_BMA4XX_BMA4XX_EMUL_H_ 7 #define ZEPHYR_DRIVERS_SENSOR_BMA4XX_BMA4XX_EMUL_H_ 8 9 #include <zephyr/drivers/emul.h> 10 #include "zephyr/dsp/types.h" 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 /** Set the sensor's current acceleration reading. */ 17 void bma4xx_emul_set_accel_data(const struct emul *target, q31_t value, int8_t shift, int8_t reg); 18 19 /** 20 * Return the current interrupt configuration. 21 * 22 * Provided pointers are out-parameters for the INT1_IO_CTRL register and 23 * whether interrupts are in latched mode. The return value is the current value 24 * of the INT_MAP_DATA register. 25 */ 26 uint8_t bma4xx_emul_get_interrupt_config(const struct emul *emul, uint8_t *int1_io_ctrl, 27 bool *latched_mode); 28 29 #ifdef __cplusplus 30 } 31 #endif 32 33 #endif /* ZEPHYR_DRIVERS_SENSOR_BMA4XX_BMA4XX_EMUL_H_ */ 34