vxworks中VxBus怎么用
发表于:2024-09-21 作者:千家信息网编辑
千家信息网最后更新 2024年09月21日,这篇文章主要介绍vxworks中VxBus怎么用,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!Vx5的driver多数情况下与BSP纠缠不清,例如BSP需要包含sysDev.c
千家信息网最后更新 2024年09月21日vxworks中VxBus怎么用Vx5的driver多数情况下与BSP纠缠不清,例如BSP需要包含sysDev.c。而Vx6发明了一种新的接口 - VxBus。它不仅规范了Driver与Device之间的接口,更重要的是让Driver与BSP无关,并最小化了Driver的架构相关性。 VxBus的driver分为三步进行初始化,因此写个最最简单例子就是
用 vxBusShow() - INCLUDE_VXBUS_SHOW,看看执行效果
哎呀,所有的Orphan Device都被挂接myDev了。看来得过滤一下,先看看有哪些 pci device,随便挑俩空闲的 把myDevReg的类型改为vxbPciRegister,并加上device list 这次PCI Device里只有两个myDev了,不过怎么unit number都是0? 得让driver每次加载时,能够自动增加这个number:在初始化时,调用一个vxbNextUnitGet()就可以了
这篇文章主要介绍vxworks中VxBus怎么用,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
#include
/* printf */ #include
/* drvBusFuncs */ #include
/* vxbPciRegister */
#define MYDEVNAME "myDev"
static void myDevInstInit (struct vxbDev *pDev);
static void myDevInstInit2 (struct vxbDev *pDev);
static void myDevInstConnect(struct vxbDev *pDev);
static struct drvBusFuncs myDevFuncs =
{
myDevInstInit, /* devInstanceInit */
myDevInstInit2, /* devInstanceInit2 */
myDevInstConnect /* devConnect */
};
static struct vxbDevRegInfo myDevReg =
{
NULL,
VXB_DEVID_DEVICE, /* 这是个Device的Driver */
VXB_BUSID_PCI, /* 这是个PCI Device */
VXB_VER_5_0_0,
MYDEVNAME,
&myDevFuncs,
NULL,
NULL,
NULL
};
static void myDevInstInit(struct vxbDev *pDev)
{ }
static void myDevInstInit2(struct vxbDev *pDev)
{ }
static void myDevInstConnect(struct vxbDev *pDev)
{ }
void myDevRegister()
{
vxbDevRegister((struct vxbDevRegInfo *)&myDevReg);
}
static struct vxbPciID myDevIDList[] = { /* devID, vendID */ {0x0740, 0x15ad}, {0x0790, 0x15ad} };static struct vxbPciRegister myDevReg = { { NULL, /* pNext */ VXB_DEVID_DEVICE, /* BUS_DEVID_DEVICE or BUS_DEVID_BUSCTRL */ VXB_BUSID_PCI, /* PCI */ VXB_VER_5_0_0, /* vxbVersion */ MYDEVNAME, /* drvName */ &myDevFuncs, /* pDrvBusFuncs */ NULL, /* pMethods */ NULL, /* devProbe */ NULL /* pParamDefaults */ }, NELEMENTS(myDevIDList), myDevIDList };
static void myDevInstInit ( struct vxbDev *pDev) { vxbNextUnitGet(pDev); }
再执行就正常了
以上是"vxworks中VxBus怎么用"这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!
内容
接口
篇文章
这是
最小
重要
两个
之间
价值
例子
兴趣
只有
小伙
小伙伴
就是
情况
效果
明了
更多
最最
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
数据库加字段过程中断网
腾讯提供网络安全
iis 数据库连接错误
广州做app的软件开发费用
互联网科技公司税收优惠
倩女幽魂人间如梦服务器怎么进
iso的网络安全体系中安全服务
电脑服务器的机器名在哪里
数据库系统安全性的三个层次
mysql 示例数据库
存储服务器的价格
画一幅关于网络安全的一幅画
徐州通用软件开发特点
电脑服务器更换方案
网络安全教育班级记录
奉贤区真实软件开发专业服务
及时雨网络技术有限公司
云计算服务器网络安全
如何登陆服务器管理
政务云网络安全监督检查
成立网络安全保卫大队
怎样考核软件开发人员
数据库在线编辑
软件开发定制哪家专业
网络安全工程师工资规划
免费的时序数据库
兰德网络安全
网络安全主要防御方法
医疗卫生软件开发
服务器硬盘多少转速