- 积分
- 21
贡献174
飞刀19 FD
注册时间2018-6-5
在线时间2 小时


扫一扫,手机访问本帖 
|
//用于打开设备的参数组,这里只用到了OPEN_EXISTING。
public const UInt32 CREATE_NEW = 1;
public const UInt32 CREATE_ALWAYS = 2;
public const UInt32 OPEN_EXISTING = 3;
public const UInt32 OPEN_ALWAYS = 4;
public const UInt32 TRUNCATE_EXISTING = 5;
public const UInt32 OPEN_FOR_LOADER = 6;
//访问模式参数组,这里用到了GENERIC_READ和GENERIC_WRITE
public const UInt32 GENERIC_READ = 0x80000000;
public const UInt32 GENERIC_WRITE = 0x40000000;
public const UInt32 GENERIC_EXECUTE = 0x20000000;
public const UInt32 GENERIC_ALL = 0x10000000;
Int32 INVALID_HANDLE_VALUE = -1;
//PWM设备操作码
const UInt32 IOCTL_BUZZER_SET1 = 0x110;
const UInt32 IOCTL_BUZZER_SET2 = 0x120;
private IntPtr hPort; //PWM设备操作句柄
这个是PWM1 和PWM2设备操作码,如果是PWM0的,按手册的原理图看是用的GPIO0_7,这个能操作吗,如果能,用的操作码是多少?
|
|