文件名称:smbus
-
所属分类:
- 标签属性:
- 上传时间:2013-03-16
-
文件大小:1.34kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
c8051f340的SMBUS(iic)总线的驱动代码,使用任务方式,只支持主器件,不支持从器件方式,调用smbtskcx查询可以再添加几条任务,#define MAXTSKCOUNT 10 中的(10)为最大任务设定,可以自己更改,smbaddtask为添加任务的函数,其它的过程用户可以不关心,
写过程为先写8位器件地址,再写数据指针指向的数据(内容用户自己设定,如要包含子地址等),读时如果有子地址,要分成两个任务,一个是要写入子地址任务,一个是读取任务,
如smbaddtask(0xa0,2,p) ambddtask(0xa1,10,s) -c8051f340 the SMBUS (iic), the bus driver code, use the task the way, only support the master device from the device does not support call smbtskcx query can then add a few tasks in# define MAXTSKCOUNT 10 (10), the largest task set can change smbaddtask added function of the task, the other process users do not care about the writing process to first write the 8-bit device address, write data pointer to the data (the contents of the user' s own settings, such as to include a sub-address ), read if there are sub-address, to be divided into two tasks, and a task is to be written to the sub-address, a read task, such as smbaddtask (0xa0, 2, p) ambddtask (0xa1, 10, s)
写过程为先写8位器件地址,再写数据指针指向的数据(内容用户自己设定,如要包含子地址等),读时如果有子地址,要分成两个任务,一个是要写入子地址任务,一个是读取任务,
如smbaddtask(0xa0,2,p) ambddtask(0xa1,10,s) -c8051f340 the SMBUS (iic), the bus driver code, use the task the way, only support the master device from the device does not support call smbtskcx query can then add a few tasks in# define MAXTSKCOUNT 10 (10), the largest task set can change smbaddtask added function of the task, the other process users do not care about the writing process to first write the 8-bit device address, write data pointer to the data (the contents of the user' s own settings, such as to include a sub-address ), read if there are sub-address, to be divided into two tasks, and a task is to be written to the sub-address, a read task, such as smbaddtask (0xa0, 2, p) ambddtask (0xa1, 10, s)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
smbus.c
smbus.h
smbus.h
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.