- 博客(59)
- 资源 (3)
- 收藏
- 关注
原创 使用VVD2013
APP(1171)1,下载并安装VVD2013.3。2,下载并解压1171设计文件。3,找到目录:C:\Users\admin\AppData\Roaming\Xilinx\Vivado4,如果目录中有类似project_1这种文件夹,备份好后删除掉。5,把解压好的1171中 - kintexSubsystemFiles子目录复制过来。6,开始菜单,运行TCL命令行;运行v
2015-10-12 22:04:40
1752
原创 资源配置
PCI的配置空间为4KB,具体格式如下表。0x030x020x010x00AddressDevice IDVendor ID0x000x070x060x050x04 Cmd RegStatus Reg0x040x0B0x0A0x090x08 Class
2015-08-27 17:35:19
1123
原创 error-2
昨天写到一半的程序,编译原本是成功的,今天打开再编译,就报错:2> Errors:2> 22.9.7: DriverVer set to incorrect date (postdated DriverVer not allowed) in \kmdfpci.inf. The current date (UTC) is 8/21/2015.看来是时间的问题;这个不难解决:
2015-08-22 07:20:58
602
原创 再谈WDK环境配置
之前用Win10+VS2015+WDK10的开发环境,发现编译非常慢;老志强处理器+8G内存的机器被拖得一塌糊涂。无奈,格式化C盘,重装系统,重新配置低版本的WDK。1,安装Win7 x642,安装VS20123,安装WDK8.04,安装WdfCoinstaller下面是虚拟机,这次用的是VMware11。1. 安装VMware112. 创建一个new mach
2015-08-19 09:56:08
735
原创 Hello World驱动
编写第一个UWD KMDF 驱动:利用Visual Studio 开发驱动程序,然后 部署到目标 计算机上。1. 新建一个空KMDF工程2. 在解决方案管理器中,查看工程属性:Driver Settings > General > Target Platform 确认为Universal3. 添加一个“C++文件”:Driver.C4. 插入以下代码:#incl
2015-08-12 15:11:07
743
原创 读写文件
BackgroundWorker background1 = new BackgroundWorker();byte[] buffer1;//HDD -> MEMBackgroundWorker background2 = new BackgroundWorker();byte[] buffer2;//MEM -> HDDUInt32 pointer1, pointer2;bool abor
2015-02-26 20:07:20
595
原创 Copy文件
private void bRun_Click(object sender, EventArgs e){ byte[] buffer; int blocksize = 4096; try { FileStream fs = new FileStream(openFileDialog1.FileName, FileMode.Open);
2015-02-26 09:24:21
448
原创 Array
#region [ Static ] GetFrequency, GetChanPower, PeakSearch, SortTrace ... To Verify public static decimal GetFrequency(decimal center, decimal span, int nop, int index) { de
2015-02-24 18:07:10
421
原创 wsRoundButton
using System;using System.ComponentModel;using System.Drawing;using System.Drawing.Design;using System.Windows.Forms;namespace wsControls{ [ToolboxItem(true), ToolboxBitmap(typeof(System.Wi
2015-02-24 18:00:28
532
原创 wsSlider
using System;using System.ComponentModel;using System.Drawing;using System.Drawing.Drawing2D;using System.Windows.Forms;namespace wsControls{ [ToolboxBitmap(typeof(TrackBar))] [DefaultE
2015-02-24 17:59:54
412
原创 wsProgressBar
using System;using System.Collections.ObjectModel;using System.ComponentModel;using System.Drawing;using System.Text;using System.Windows.Forms;namespace wsControls{ [ToolboxItem(true), To
2015-02-24 17:59:06
519
原创 wsPanelView
using System;using System.Collections.ObjectModel;using System.ComponentModel;using System.Drawing;using System.Drawing.Design;using System.Windows.Forms;namespace wsControls{ [ToolboxItem
2015-02-24 17:58:34
361
原创 wsPlot
using System;using System.Collections.ObjectModel;using System.ComponentModel;using System.Drawing;using System.Drawing.Drawing2D;namespace wsControls{ #region [ Classs ] wsPlot public
2015-02-24 17:58:21
434
原创 wsArray
using System;using System.Collections.ObjectModel;using System.Linq;using System.Text;namespace wsControls{ public class wsArray { #region [ Static ] GetFrequency, GetChanPower,
2015-02-24 17:55:36
412
原创 wsFile
using System;using System.Collections.ObjectModel;using System.Data;using System.Drawing;using System.IO;using System.Text;namespace wsControls.IO{ public class wsFile { publi
2015-02-24 17:55:00
478
原创 ini, Reg
using System.Text;using Microsoft.Win32;namespace wsWin{ #region [ *.ini file ] public class InI { public string path; public InI(string INIPath) {
2015-02-24 17:53:46
569
原创 FileAssociation
using System;using System.Text;using System.Runtime.InteropServices;using System.Windows.Forms;using Microsoft.Win32;namespace wsWin{ #region [ FileAssociation ] public class FileAssoci
2015-02-24 17:53:11
1140
原创 win32
using System;using System.Runtime.InteropServices;using System.Drawing;using System.Text;namespace wsWin{ public class Win32 { public const int GW_HWNDFIRST = 0; public
2015-02-24 17:51:33
702
原创 StringX
namespace wsControls{ public class StringX { public static char mylar = (char)220; #region [ Property ] String public string String { get; set; } #endregion
2015-02-24 17:50:31
847
原创 中断
两个函数就可以搞定:UInt32 dwStatus = dev.EnableInterrupts(new USER_INTERRUPT_CALLBACK(DISPLAYADAPTE_IntHandler), dev.Handle);UInt32 dwStatus = dev.DisableInterrupts();
2015-02-24 08:37:22
568
原创 向给定地址写入数据
与读数据相似,写数据可以通过下面函数实现:UInt32 wdc_lib_decl.WDC_WriteAddr8(WDC_DEVICE_HANDLE hDev, UInt32 dwAddrSpace, uint dwOffset, ref byte val) //1 byteUInt32 wdc_lib_decl.WDC_WriteAddr16(WDC_DEVICE_HANDLE hD
2015-02-24 08:36:42
2786
原创 按地址读取数据
对已知的地址进行数据读取,需要用到下面读取函数:UInt32 wdc_lib_decl.WDC_ReadAddr8(WDC_DEVICE_HANDLE hDev, UInt32 dwAddrSpace, uint dwOffset, ref byte val) //1 byteUInt32 wdc_lib_decl.WDC_ReadAddr16(WDC_DEVICE_HANDLE h
2015-02-24 08:36:12
2160
原创 打开,关闭设备
首先添加引用:using Jungo.wdapi_dotnet;using Jungo.yourapp_lib;获取PCI设备列表:private YourApp_DeviceList pciDevList;//Declare PCI Device ListpciDevList = YourApp_DeviceList.TheDeviceList();//NewUInt3
2015-02-24 08:35:46
1156
原创 使用VCS2008编译Windriver工程
前面折腾了那么久,现在终于可以进入代码阶段了。遵照Windriver的quick start guide,本文也以显卡为例。首先:打开Windriver,找到目标设备:显卡是不需要我们安装驱动的,因此不用生成inf,直接进入下一步操作即可。Next:在Windriver主窗口中点击生成代码按钮:本文选取的平台是C#,VS2008;至于是x86还是x64,根据需要吧。
2015-02-24 08:35:31
2645
原创 Windriver的VCS开发环境
折腾了一整天,终于能成功编译了。话说,WinDriver真操蛋,即使最新版的V11.7,配合Win7 x64和VCS2012,生成的C#工程虽然能够编译成功,但是运行时却总是报错[WDC_PciGetDeviceInfo()]等函数都找不到;硬件设备连接无法打开,更不用说数据读写了。难道这是试用版的限制但想想也不应该,因为其提供的演示程序C:\WinDriver\csharp.net\pci_
2015-02-24 08:34:59
2243
原创 添加INF驱动
为板卡添加Windriver生成的驱动,其过程稍有别于其他常见设备。主要过程如下:打开设备管理器,找到板卡:【注】PCI卡在设备管理器中并不显示为未知设备而是在“系统设备”中显示为PCI RAM控制器;如图:果断右键,Update Driver -> Browse ; 然后,注意了:选择从列表中添加驱动!!!系统会给出所列设备,点击“Have Disk”,找到之前生
2015-02-24 08:34:12
1366
原创 使用Windriver生成PCI驱动
首先安装Windriver,这里用的是V10.2,据说这个版本支持Win7 X64。 安装前,我还注意看了一下,ISE14.7用的也是这个版本。将PCI卡插入到计算机主板上,然后启动。貌似卡的检测需要用到BIOS,因此建议先安装Windriver,然后再插卡,开机;否则可能检测不到PCI卡。启动Windriver,新建工程:在列表中,找到PCI卡,并选中点击右侧
2015-02-24 08:33:36
4340
3
原创 SP605开发环境搭建
借了一块SP605的FPGA开发板,打算开始了解FPGA,搞了一天,才配置好楚开发环境。其实主要步骤是遵循Xilinx说明书SP605 PCIe X1 Gen1 Design Creation来的,但还是遇到了一些麻烦。1) 首先安装ISE开发环境。说明书里用的是V13.2;开发套件里配的是关盘是V13.1;我最后用的是14.7。安装过程相当很耗时间。2)生成CORES
2015-02-24 08:33:00
2317
1
原创 3D字体
创建字体需要使用Mash类 添加引用:using Microsoft.DirectX.Direct3D;Mesh mesh = null;Material meshMaterials ;public virtual void OnCreateDevice(object sender, EventArgs e){ mesh = Mesh.TextFromFont(devic
2015-02-24 08:32:16
507
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人