using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace WagweiCSharpDIO_AWP_ASB
{
public class Wagwei_asbDio
{
//**************************************************************
//asbDioInitialize
[DllImport("asbDio.dll")]
public static extern int asbDioInitialize();

public const string asbDioInitializeRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-2 ASBDIO_RESOURCE_ERROR
//-3 ASBDIO_TIMEOUT_ERROR
//-5 ASBDIO_DRIVER_ERROR
//-7 ASBDIO_THREAD_ERROR
//-8 ASBDIO_NO_TARGET_BOARD
//-9 ASBDIO_NOT_SUPPORT_FPGA";

//asbDioFinalize
[DllImport("asbDio.dll")]
public static extern int asbDioFinalize();

public const string asbDioFinalizeRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-5 ASBDIO_DRIVER_ERROR
//-6 ASBDIO_EVENT_ERROR
//-7 ASBDIO_THREAD_ERROR";

//**************************************************************
//asbDioGetDeviceInfo
[DllImport("asbDio.dll")]
public static extern int asbDioGetDeviceInfo(out DEVICE_INFO pDevInfo);

public struct DEVICE_INFO
{
long FpgaVer;
long BoardRev;
long DriverVer;
long LibraryVer;
long BitMax;
}

public const string asbDioGetDeviceInfoRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-4 ASBDIO_INVALID_PARAMETER
//-5 ASBDIO_DRIVER_ERROR";

//**************************************************************
//asbDioRead
[DllImport("asbDio.dll")]
public static extern int asbDioRead(out uint pRdata);

//pRdata LPDWORD

public const string asbDioReadRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

//asbDioWrite
[DllImport("asbDio.dll")]
public static extern int asbDioWrite(uint Wdata, uint Mask);

//Wdata DWORD
//Mask DWORD

//事例
//DWORD Wdata (0 << 2) | (1 << 1) | (1 << 0); //0,1为High;2为Low
//DWORD Mask (1 << 2) | (1 << 1) | <1 << 0); //0,1,2有效

public const string asbDioWriteRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

//asbDioReadBack
[DllImport("asbDio.dll")]
public static extern int asbDioReadBack(out uint pRdata);

//pRdata LPDWORD

public const string asbDioReadBackRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

//**************************************************************
//asbDioSetIntMask
[DllImport("asbDio.dll")]
public static extern int asbDioSetIntMask(uint SetMask);

//SetMask DWORD

public const string asbDioSetIntMaskRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

//asbDioGetIntMask
[DllImport("asbDio.dll")]
public static extern int asbDioGetIntMask(out uint pGetMask);

//pGetMask LPWORD

public const string asbDioGetIntMaskRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

//asbDioSetIntPolarity
[DllImport("asbDio.dll")]
public static extern int asbDioSetIntPolarity(uint SetPolarity);

//SetPolarity DWORD

public const string asbDioSetIntPolarityRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

//asbDioGetIntPolarity
[DllImport("asbDio.dll")]
public static extern int asbDioGetIntPolarity(out uint pGetPolarity);

//pGetPolarity LPDWORD

public const string asbDioGetIntPolarityRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

//asbDioRegistCallback
[DllImport("asbDio.dll")]
public static extern int asbDioRegistCallback(UserCallBack HookFunc);

public const string asbDioRegistCallbackRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST";

public delegate void UserCallBack(INT_BUFFER intBuffer);

public struct INT_BUFFER
{
ulong ulPin;
ulong ulPort;
ulong ulTime;
}

//**************************************************************
//asbDioReadOnBoardTimer
[DllImport("asbDio.dll")]
public static extern int asbDioReadOnBoardTimer(out uint pTimerCount);

//pTimerCount LPDWORD

public const string asbDioReadOnBoardTimerRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

//**************************************************************
//asbDioSetDigitalFilter
[DllImport("asbDio.dll")]
public static extern int asbDioSetDigitalFilter(uint SetFilter);

//SetFilter DWORD

public const string asbDioSetDigitalFilterRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

//asbDioGetDigitalFilter
[DllImport("asbDio.dll")]
public static extern int asbDioGetDigitalFilter(out uint pGetFilter);

//pGetFilter LPDWORD

public const string asbDioGetDigitalFilterRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";

// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-2 ASBDIO_RESOURCE_ERROR
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER
//-5 ASBDIO_DRIVER_ERROR
//-6 ASBDIO_EVENT_ERROR
//-7 ASBDIO_THREAD_ERROR
//-8 ASBDIO_NO_TARGET_BOARD
//-9 ASBDIO_NOT_SUPPORT_FPGA

}
}

asbDio (asbDio.dll)的更多相关文章

  1. dll文件32位64位检测工具以及Windows文件夹SysWow64的坑

    自从操作系统升级到64位以后,就要不断的需要面对32位.64位的问题.相信有很多人并不是很清楚32位程序与64位程序的区别,以及Program Files (x86),Program Files的区别 ...

  2. C#创建dll类库

    类库让我们的代码可复用,我们只需要在类库中声明变量一次,就能在接下来的过程中无数次地使用,而无需在每次使用前都要声明它.这样一来,就节省了我们的内存空间.而想要在类库添加什么类,还需取决于类库要实现哪 ...

  3. 关于Linux和Windows下部署mysql.data.dll的注册问题

    mysql ado.net connector下载地址: http://dev.mysql.com/downloads/connector/net/ 选择版本: Generally Available ...

  4. Windows平台Go调用DLL的坑

    最近的项目中,使用了GO来开发一些服务中转程序.业务比较简单,但是有一些业务需要复用原有C++开发的代码.而在WINDOWS,用CGO方式来集成C/C++代码并不是太方便.所以用DLL把C++的代码封 ...

  5. C#开发奇技淫巧三:把dll放在不同的目录让你的程序更整洁

    系列文章 C#开发奇技淫巧一:调试windows系统服务 C#开发奇技淫巧二:根据dll文件加载C++或者Delphi插件 C#开发奇技淫巧三:把dll放在不同的目录让你的程序更整洁 程序目录的整理 ...

  6. .Net使用Newtonsoft.Json.dll(JSON.NET)对象序列化成json、反序列化json示例教程

    JSON作为一种轻量级的数据交换格式,简单灵活,被很多系统用来数据交互,作为一名.NET开发人员,JSON.NET无疑是最好的序列化框架,支持XML和JSON序列化,高性能,免费开源,支持LINQ查询 ...

  7. 使用Newtonsoft.Json.dll(JSON.NET)动态解析JSON、.net 的json的序列化与反序列化(一)

    在开发中,我非常喜欢动态语言和匿名对象带来的方便,JSON.NET具有动态序列化和反序列化任意JSON内容的能力,不必将它映射到具体的强类型对象,它可以处理不确定的类型(集合.字典.动态对象和匿名对象 ...

  8. ILMerge合并多个DLL

    序言 如果你的项目要提供多个dll给别人用,那么不妨让你的dll合并为一个,让别人看起来简洁,引用起来不会过于繁琐. 本篇比较少,但也算是比较实用吧. 下载微软的辅助工具ILMerge Imerge下 ...

  9. VS2010中dll不可用问题

    最近做项目的时候,深圳那边提供了一个算法.算法在那边跑的好的很,但是在我这边怎么跑都跑不起来,总是报错:说找不到dll. 1.第一种想法:找不到dll,是不是dll放的位置不对.找了一下目录,导入的路 ...

随机推荐

  1. vb Replace 实现

    今天改一个VB程序时发现程序自带的replace 函数不知什么原因竟然不好用了 所以就自己写了一个玩玩 记录一下 'XGZ '替换字符 Private Function Replace1(ByVal ...

  2. .net mvc 几种跨域获取数据方案

    方案一: 在web.conflg配置文件system.webServer节点中添加以下节点配置 <!--允许 "所有网站" 跨域访问写法:--><httpProt ...

  3. Centos7 Putty SSH密钥登录

    在本地电脑打开PuTTYgen程序,点击Generate生成密钥,可以再设置一层密码,保存公钥和私钥到本地文件,保存好,最好多处备份 先用密码登录远程Centos vim ~/.ssh/authori ...

  4. PIE SDK打开自定义栅格数据

    1. 数据介绍 信息提取和解译的过程中,经常会生成一部分中间临时栅格数据,这些数据在执行完对应操作后就失去了存在的价值,针对这种情况,PIE增加了内存栅格数据集,来协助用户完成对自定义栅格数据的读取和 ...

  5. 给定制的vuejs组件添加v-model双向绑定支持

    用过vuejs的前端工程师,对于v-model一定印象深刻.它向类似textarea,input等原生html原生添加双向数据绑定的能力非常方便.但是对于你的定制vue组件并不是能够直接应用v-mod ...

  6. Salesforce LWC学习(一)Salesforce DX配置

    LWC: Create a Salesforce DX Project and Lightning Web Component:https://www.youtube.com/watch?v=p268 ...

  7. 一问带你区分清楚Authentication,Authorization以及Cookie、Session、Token

    上周写了一个 适合初学者入门 Spring Security With JWT 的 Demo .Demo 地址:https://github.com/Snailclimb/spring-securit ...

  8. 将canvas中左上角的原点坐标位置改为左下角

    在使用canvas的时候,原点坐标在左上角,这个很犯人,因为一般的坐标基本都是在左下角,即笛卡尔坐标系,那怎么进行转变呢,在这里用到了canvas的translate,rotate,和scale进行转 ...

  9. Android源码分析(十五)----GPS冷启动实现原理分析

    一:原理分析 主要sendExtraCommand方法中传递两个参数, 根据如下源码可以知道第一个参数传递delete_aiding_data,第二个参数传递null即可. @Override pub ...

  10. using 中写 return 一样会释放using 中对象 但是会在外面定义一个一样的对象 赋值后 释放 最后 return 外面定义的那个对象

    static DataTable getDataTable() { ")) { SqlCommand com = new SqlCommand("", con); Sql ...