07 2022 档案
摘要:1.参考文档 网 址:http://en.wikipedia.org/wiki/Conventional_PCI ; 网 址:http://en.wikipedia.org/wiki/PCI_configuration_space ; 2.配置与初始化 在系统启动时,在 x86 上,BIOS 负责配
阅读全文
摘要:转自: https://blog.csdn.net/u010872301/article/details/78519371 实现基本的PCIE驱动程序,实现以下模块:初始化设备、设备打开、数据读写和控制、中断处理、设备释放、设备卸载。本程序适合PCIE驱动开发通用调试的基本框架,对于具体PCIE设备
阅读全文
摘要:设备驱动程序和实时驱动程序模型 • RTDM: unified interface for users and developers of RT drivers • Adopted as the Xenomai driver programming interface • Also used by
阅读全文
摘要:
阅读全文
摘要:点击查看代码 #include "rfm2g_driver.h" #define RFM2G_MEMORY_SPACE 1 #define RFM2G_IO_SPACE 2 /*** Local prototypes *****************************************
阅读全文
摘要:
阅读全文
摘要:根据xenomai代码里面的example修改出一个字符驱动代码及其驱动对应的测试程序。 点击查看代码 #include <linux/module.h> #include <rtdm/rtdm_driver.h> MODULE_LICENSE("GPL"); MODULE_AUTHOR("ziv,
阅读全文
摘要:点击查看代码 Xenomai3驱动程序: 驱动C文件: 自定义Mydriver.c,用于xenomai内核设备驱动相关 原始源文件路径:xenomai3.x\kernel\drivers\testing\rtdmtest.c 相关函数解析: static int __init rtdm_test_i
阅读全文
摘要:点击查看代码 /* * Copyright (C) 2019 BNIS * Make file 请参考过往博客 * 本例程在模块初始化时启动3个任务。在任务1中,实现了类似定时器 * 的定时功能,通过第2任务去结束第1任务,任务3启动后等待任务2结束再继续执行. * */ #include <lin
阅读全文
摘要:在Linux线程同步机制里常用有互斥锁和信号量两种方法. 在理解为什么有些代码需要加锁后再执行,先了解一下原子操作的概念 所谓原子操作是指不会被线程调度机制打断的操作;这种操作一旦开始,就一直运行到结束, 中间不会有任何 context switch (切换到另一个线程) 原子操作是不可分割的,在执
阅读全文
摘要:#RTDM中断请求函数原型: int rtdm_irq_request (rtdm_irq_t *irq_handle, unsigned int irq_no, rtdm_irq_handler_t handler, unsigned long flags, const char *device_
阅读全文
摘要:点击查看代码 /* * Copyright (C) 2019 BNIS * 用dmesg -c 查看 * 定时器测试,insmod 模块后,定时器1为每隔1秒钟触发一次!测试显示定时器分辨率精度, 定时器2为每隔2秒触发一次。 * Timer-api查看: * https://xenomai.org
阅读全文
摘要:// 启动多个xenomai进程,并通过top指令查看各个xn进程的切换数据,启动程序时增加一个task的优先级,默认是最高的99 //通过watch cat /proc/xenomai/sched/stat 动态查看 MSW(模式切换次数) 和 CSW(上下文切换次数) 点击查看代码 //main
阅读全文
摘要:点击查看代码 Xenomai3驱动程序: 驱动C文件: 自定义Mydriver.c,用于xenomai内核设备驱动相关 原始源文件路径:xenomai3.x\kernel\drivers\testing\rtdmtest.c 相关函数解析: static int __init rtdm_test_i
阅读全文