/** * @file demo_hal_driver.h * @author Rich Chan (cy187lion@sina.com) * @brief * @version 0.1 * @date 2020-06-10 * * @copyright Copyright (c) 2020 * */ #ifndef _ANDROID_DEMO_HAL_DRIVER_INTERFACE_H_ #define _ANDROID_DEMO_HAL_DRIVER_INTERFACE_H_ #include __BEGIN_DECLS #define MICCOM_HARDWARE_MODULE_ID "miccom" struct miccom_module_t { struct hw_module_t common; }; struct miccom_device_t { struct hw_device_t common; int fd; int (*set_reg)(struct miccom_device_t* dev, char reg, unsigned char num); int (*get_reg)(struct miccom_device_t* dev, char* reg, unsigned char num); }; __END_DECLS #endif // _ANDROID_DEMO_HAL_DRIVER_INTERFACE_H_