The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
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.
|Upcoming OSR Seminars|
|OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!|
|Writing WDF Drivers||7 Dec 2020||LIVE ONLINE|
|Internals & Software Drivers||25 Jan 2021||LIVE ONLINE|
|Developing Minifilters||8 March 2021||LIVE ONLINE|