#pragma once #include "board_config.h" #include "cpu.h" #include "includes.h" #include "sensor_driver.h" #include "sensor_driver_p11.h" #include "sensor_algorithm_jl_motion.h" typedef struct { u8 dev_type; sensor_info_t *(*dev_info)(void); s8(*dev_init)(u8 enable); s8(*dev_cbuf)(u8 index, u8 enable); u16(*dev_get)(u8 index, void *buff, u16 buff_len); } SENSOR_HAL_INTERFACE; extern SENSOR_HAL_INTERFACE sensor_hal_begin[]; extern SENSOR_HAL_INTERFACE sensor_hal_end[]; #define REGISTER_SENSOR_HAL(sensorhal) \ static const SENSOR_HAL_INTERFACE sensorhal SEC_USED(.sensor_hal) #define list_for_each_sensor_hal(c) \ for (c=sensor_hal_begin; c