I'm an absolute noob on Windows development. I'm mostly a linux guy.
I'm tring to write a driver to add support for a sensor under Windows; the device is a chromebook so linux support is native and its working fine.
The sensor is a simple I2C device, It simply works by reading two registers.
I've read some articles on the Microsoft documentation website and I've started to write some code.
I've started with the sample ADL345acc driver. I've cloned the repository. Copied the project files to a new directory and I've created a new project based on thoose.
I've then started to look into the "sensor combo driver" to see the ALS parameters to send back to the OS.
I "should" have wrote a more or less complete driver. But the device/driver fails after installing the driver. (At least it matches the ACPI _HID and get probably loaded.)
Now, I have no idea on how I can troubleshoot it. As far I know the demo driver have a lot of debug informations on some sort of output.
And I would like to know how can I access that information to see whats going wrong.
The sensor flow:
It is quite simple. Only polling, no HW threshold. (The sensor have an active low IRQ pin but only for threshold Overflow/Undeflow)
1. Write 0x00 on register 0x08
2. Write 0x01 on register 0x01
3. Write (0x05 << 5) on register 0x00 to start the sensor
5. Start a timer to poll the sensor
6. On timer expire read the sensor data: Read register 0x02 and 0x03, combine them to have the 16bit ADC value and multiply it by scale.)
Another question that i'm having is about the GUID, how can I generate one? Rightnow i'm using the one provided by the Sensor combo sample
Any help would be great, for me writing a MS/Windows driver is a lot harder than the one for Linux due to lack of experience.
It looks like you're new here. If you want to get involved, click one of these buttons!
|Upcoming OSR Seminars|
|Writing WDF Drivers||21 Oct 2019||OSR Seminar Space & ONLINE|
|Internals & Software Drivers||18 Nov 2019||Dulles, VA|
|Kernel Debugging||30 Mar 2020||OSR Seminar Space|
|Developing Minifilters||27 Apr 2020||OSR Seminar Space & ONLINE|