Hi,
I had some troubles getting a custom HID device to work that has both input and output reports to Windows 10 host. Here is my working example template that might save some time for others attempting something similar.
https://github.com/tikonen/ble_app_hids_custom
This implements
- Custom BLE HID device that has both an output and input report. Tested to work with Windows 10. I used Win32 API SetupDiEnumDeviceInterfaces+SetupDiGetDeviceInterfaceDetail to find the device path. Device path can be opened CreateFile. Reports can be read/received simply via WriteFile and ReadFile
- Delayed I2C read from si7021 sensor (this sensor requires wait of 25ms before data is ready to read)
- GPIO interrupt triggered reading from sensor
Thanks!