A bit of background. I have been asked to offer an independent
programming
study for high school students. I thought it would be really cool to
challenge
them with an embedded coding challenge on a embedded windows ce device.
I have a windows ce embedded device and development system up and
running. Now I want a practical example of an industrial control.
Reading
temperature from a USB device and displaying it in C# _seems_ like a
doable
project and very practical. I found a USB temperature probe that
supports HID
on ce.
Below is the read me file. My question is can I call these methods from
C#? I
don't even know if C# on windows embedded supports PINVOKE. To put it
mildly I am a in a bit over my head here. Any answers appreciated.
Oak USB Sensor HID Driver for Windows CE 5.0
=============== =============== ==============
General
-------
The Oak USB Sensor HID Driver adds support for ToradexÆ USB Sensors to
Windows CE 5.0 operations systems. The driver provides a stream
interface
which allows using standard file system functions to access the device
such
as CreateFile, ReadFile, IOControl, and so on. Treating devices as
special files
is common to many operating systems. Serial ports traditionally have
been
represented by the COMx: special file names, similarly Oak USB Sensors
are
represented by the OAKx: special file names.
For more information about stream interface drivers please refere to
MSDN
documentation:
Installation
------------
Copy and run the OakHidCE_v1.0.c ab file on your Windows CE 5.0 target
system and choose an appropriate installation directroy. For persistent
driver
installation on ToradexÆ Colibri modules we recommend "\FlashDisk \" as
install dir.
Usage
-----
- Detect Oak sensor hot plugging by the events: OAK_ATTACH_EVEN T and
OAK_DETACH_EVEN T
(use GetEventData() to determine what sensor has been attached or
detached)
- Open sensor access: hOakDevice=Crea teFile(L"OAKx:" ,....)
- Use/access sensor: ReadFile(hOakDe vice,...)
DeviceIoControl (hOakDevice,IOC TL_OAK_...)
- Terminate sensor use: CloseHandle(hOa kDevice)
Supported IOCTLs
----------------
- IOCTL_OAK_GET_I NPUT_REPORT
- IOCTL_OAK_GET_F EATURE_REPORT
- IOCTL_OAK_SET_O UTPUT_REPORT
- IOCTL_OAK_SET_F EATURE_REPORT
- IOCTL_OAK_GET_I NPUT_REPORT_LEN GTH
- IOCTL_OAK_GET_O UTPUT_REPORT_LE NGTH
- IOCTL_OAK_GET_F EATURE_REPORT_L ENGTH
- IOCTL_OAK_GET_I NPUT_VALUE_COUN T
- IOCTL_OAK_GET_O UTPUT_VALUE_COU NT
- IOCTL_OAK_GET_I NPUT_VALUE_CAPS
- IOCTL_OAK_GET_O UTPUT_VALUE_CAP S
- IOCTL_OAK_GET_S TRING_MANUFACT
- IOCTL_OAK_GET_S TRING_PRODUCT
- IOCTL_OAK_GET_S TRING_SERIAL
- IOCTL_OAK_GET_S TRING_INDEXED
- IOCTL_OAK_GET_Q UEUE_SIZE
- IOCTL_OAK_SET_Q UEUE_SIZE
- IOCTL_OAK_GET_A CCESS_TIMEOUT
- IOCTL_OAK_SET_A CCESS_TIMEOUT
- IOCTL_OAK_GET_P RODUCT_ID
Regards,
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
programming
study for high school students. I thought it would be really cool to
challenge
them with an embedded coding challenge on a embedded windows ce device.
I have a windows ce embedded device and development system up and
running. Now I want a practical example of an industrial control.
Reading
temperature from a USB device and displaying it in C# _seems_ like a
doable
project and very practical. I found a USB temperature probe that
supports HID
on ce.
Below is the read me file. My question is can I call these methods from
C#? I
don't even know if C# on windows embedded supports PINVOKE. To put it
mildly I am a in a bit over my head here. Any answers appreciated.
Oak USB Sensor HID Driver for Windows CE 5.0
=============== =============== ==============
General
-------
The Oak USB Sensor HID Driver adds support for ToradexÆ USB Sensors to
Windows CE 5.0 operations systems. The driver provides a stream
interface
which allows using standard file system functions to access the device
such
as CreateFile, ReadFile, IOControl, and so on. Treating devices as
special files
is common to many operating systems. Serial ports traditionally have
been
represented by the COMx: special file names, similarly Oak USB Sensors
are
represented by the OAKx: special file names.
For more information about stream interface drivers please refere to
MSDN
documentation:
Installation
------------
Copy and run the OakHidCE_v1.0.c ab file on your Windows CE 5.0 target
system and choose an appropriate installation directroy. For persistent
driver
installation on ToradexÆ Colibri modules we recommend "\FlashDisk \" as
install dir.
Usage
-----
- Detect Oak sensor hot plugging by the events: OAK_ATTACH_EVEN T and
OAK_DETACH_EVEN T
(use GetEventData() to determine what sensor has been attached or
detached)
- Open sensor access: hOakDevice=Crea teFile(L"OAKx:" ,....)
- Use/access sensor: ReadFile(hOakDe vice,...)
DeviceIoControl (hOakDevice,IOC TL_OAK_...)
- Terminate sensor use: CloseHandle(hOa kDevice)
Supported IOCTLs
----------------
- IOCTL_OAK_GET_I NPUT_REPORT
- IOCTL_OAK_GET_F EATURE_REPORT
- IOCTL_OAK_SET_O UTPUT_REPORT
- IOCTL_OAK_SET_F EATURE_REPORT
- IOCTL_OAK_GET_I NPUT_REPORT_LEN GTH
- IOCTL_OAK_GET_O UTPUT_REPORT_LE NGTH
- IOCTL_OAK_GET_F EATURE_REPORT_L ENGTH
- IOCTL_OAK_GET_I NPUT_VALUE_COUN T
- IOCTL_OAK_GET_O UTPUT_VALUE_COU NT
- IOCTL_OAK_GET_I NPUT_VALUE_CAPS
- IOCTL_OAK_GET_O UTPUT_VALUE_CAP S
- IOCTL_OAK_GET_S TRING_MANUFACT
- IOCTL_OAK_GET_S TRING_PRODUCT
- IOCTL_OAK_GET_S TRING_SERIAL
- IOCTL_OAK_GET_S TRING_INDEXED
- IOCTL_OAK_GET_Q UEUE_SIZE
- IOCTL_OAK_SET_Q UEUE_SIZE
- IOCTL_OAK_GET_A CCESS_TIMEOUT
- IOCTL_OAK_SET_A CCESS_TIMEOUT
- IOCTL_OAK_GET_P RODUCT_ID
Regards,
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
Comment