1 /* 2 * Copyright (C) 2015-2017 Alibaba Group Holding Limited 3 */ 4 5 #ifndef SENSOR_HAL_H 6 #define SENSOR_HAL_H 7 #include <aos/init.h> 8 #include <aos/errno.h> 9 #include <aos/compiler.h> 10 #include "ulog/ulog.h" 11 #include "sensor/sensor.h" 12 13 #define SENSOR_DRV_ADD(func) \ 14 int __sensor_##func##_func__(void){ \ 15 return func(); \ 16 } 17 18 typedef int (*SENSOR_INIT_FUN)(void); 19 20 int sensor_init(void); 21 int sensor_create_obj(sensor_obj_t *sensor); 22 23 #if SENSOR_CONFIG_MODBUS_ENABLE 24 int modbus_init(void); 25 #endif 26 27 #endif /* SENSOR_HAL_H */ 28