1 /* 2 * Arm SCP/MCP Software 3 * Copyright (c) 2019-2022, Arm Limited and Contributors. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #ifndef MOD_MOCK_SENSOR_H 9 #define MOD_MOCK_SENSOR_H 10 11 #include <mod_sensor.h> 12 13 #include <stdint.h> 14 15 /*! 16 * \ingroup GroupModules 17 * \defgroup GroupMockSensor Mock Sensor Driver 18 * 19 * \details The `mock_sensor` module provides a simulated asynchronous driver 20 * for use alongside the `sensor` HAL interface on systems that do not 21 * provide a real asynchronous sensor. 22 * 23 * This mock driver implements the Sensor HAL driver API and always defers 24 * the 'get_value' request. An example of the execution flow is shown in 25 * `Deferred Response Architecture`. 26 * 27 * \{ 28 */ 29 30 /*! \brief Element configuration */ 31 struct mod_mock_sensor_dev_config { 32 /*! Pointer to sensor information */ 33 struct mod_sensor_info *info; 34 35 /*! Sensor HAL identifier */ 36 fwk_id_t sensor_hal_id; 37 38 /*! Identifier of the alarm assigned to this element */ 39 fwk_id_t alarm_id; 40 41 /*! Sensor read value */ 42 mod_sensor_value_t *read_value; 43 44 #ifdef BUILD_HAS_SCMI_SENSOR_V2 45 /*! Pointer to sensor axis information */ 46 const struct mod_sensor_axis_info *axis_info; 47 48 /*! Sensor axis count */ 49 uint8_t axis_count; 50 #endif 51 }; 52 53 /*! 54 * \} 55 */ 56 57 #endif /* MOD_MOCK_SENSOR_H */ 58