# DeviceIO **Repository Path**: water_source/DeviceIO ## Basic Information - **Project Name**: DeviceIO - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-06 - **Last Updated**: 2024-12-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DeviceIO DeviceIO是一个驱动框架,用于封装嵌入式HAL驱动,为上层应用提供服务。 ## 编译 本程序使用xmake进行编译,也可以使用其它方式,毕竟只有少数文件。 ```bash cd apps/linux/test xmake && xmake run ``` ## API ```c int IO_OpenDevice(char *name, int flags, IO_DeviceType **deviceOut); int IO_WriteDevice(IO_DeviceType *device, unsigned long off, char *buf, unsigned long len); int IO_ReadDevice(IO_DeviceType *device, unsigned long off, char *buf, unsigned long len); int IO_ControlDevice(IO_DeviceType *device, unsigned long cmd, void *arg); int IO_CloseDevice(IO_DeviceType *device); ``` ## TODO * 添加directIO接口支持 * 添加设备描述配置信息(基于json) * 添加真正的驱动设备案例