#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <unistd.h>
#define BCD2BIN(val) (((val) & 0x0f) + ((val)>>4)*10)
int main(void)
{
int fd;
unsigned char buf[21];
unsigned char sendbuf[2];
unsigned char *buffer="abcdefg123456";
if ((fd = open("/mnt/udisk/test",2)) < 0)
{
printf("cannot open /dev/Kbd7279\n");
exit(0);
}
printf("can open /dev/Kbd7279\n");
lseek(fd,0,2);
write(fd,buffer,10);
read(fd,buffer,10);
printf("data=%s \n",buffer);
close(fd);
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
file_operation_sample.rar (3个子文件)
file operation sample
file.c~ 487B
file 12KB
file.c 501B
共 3 条
- 1
资源评论
四散
- 粉丝: 49
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功