34 lines
702 B
C
34 lines
702 B
C
/**
|
|
* @file demo_hal_driver.h
|
|
* @author Rick 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 <hardware/hardware.h>
|
|
|
|
__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
|