Larry Snizek
102d1b4e3a
Tidy up HID
2019-10-23 15:05:10 +01:00
larry
9fb073a2b0
Merge pull request #3 from michaelb/pendragon_hid_add_requests
...
Pendragon hid add requests
2019-10-17 14:10:09 +01:00
Michael Banther
a6f3daf581
Update change log.
2019-10-16 16:03:52 +01:00
Michael Banther
a7c0ac6234
Protect configurations that do not include HID functionality from HID code.
2019-10-16 15:58:06 +01:00
Michael Banther
024c0304f1
Reverse the order of operands in an equals comparison to allow the compiler to catch a mistaken use of '=' instead of '=='.
2019-10-16 14:57:33 +01:00
Michael Banther
21ec3cf7bd
Put the processing of the Set Idle request in a static function.
...
This reorganisation prepares this file for adding other HID Class-specific requests without the
2019-10-16 12:18:50 +01:00
Michael Banther
9a7c2d85b2
Reorganise file layout for easier maintenance and reading.
2019-10-16 11:47:32 +01:00
Michael Banther
8820ddf269
Add documentation.
2019-10-16 11:37:27 +01:00
Michael Banther
6afb4ab7e4
Remove debugging print.
2019-10-15 15:43:05 +01:00
Michael Banther
5caca37177
Change the representation, but not the logic, of a multi-part conditional expression to make it easier to understand.
2019-10-15 15:40:26 +01:00
Michael Banther
a5f17c46fc
Use a variable large enough to hold the Set Idle duration in ms without overflow.
2019-10-15 15:39:14 +01:00
Michael Banther
e4f0b73a88
Explicitly label assignment of zero as unsigned when used with unsigned variables.
2019-10-15 15:38:16 +01:00
Michael Banther
3331c9e97b
Add handling for an indefinite duration.
2019-10-15 10:45:20 +01:00
Michael Banther
aeb1d58bf3
The interface number occupies the entire sp.wIndex field.
2019-10-15 10:44:34 +01:00
Michael Banther
97e3233120
Rename parameter to a less ambiguous name.
2019-10-15 10:42:33 +01:00
Michael Banther
962e91adec
Include xua.h to pick up the NUM_USB_CHAN_IN and NUM_USB_CHAN_OUT pre-processor symbols.
...
They're used further down in the file. If not present through an #include of xua_h outside of and before the #include of descriptor_defs.h or through definition in the Make file, the enumeration of interface numbers silently mis-assigns values.
2019-10-14 16:47:59 +01:00
Michael Banther
9f98e13342
Use the HID_CONTROLS pre-processor symbol consistently.
2019-10-14 16:42:34 +01:00
Michael Banther
1808d7affa
Initial implementation of the USB HID Set_Idle Request.
...
This code builds successfully. It has not been tested even a little.
2019-10-10 17:21:21 +01:00
Larry Snizek
8ba9a0064c
Cosmetic
2019-10-09 16:45:57 +01:00
Larry Snizek
b592c943f8
Set_Idle request handled (incomplete reports sent instead of NAK)
2019-10-08 21:18:08 +01:00
Michael Banther
2a960700c5
Remove the duplicate USB HID Report Descriptor that Git, for some unknown reason, produced at the last merge.
2019-10-08 13:54:16 +01:00
Michael Banther
f08e79197d
Merge branch 'pendragon_hid_usage_investigation' into pendragon
2019-10-08 13:50:23 +01:00
Michael Banther
1690c4eff6
Remove the USB HID Report descriptor with the Voice Command Usage.
...
This commit also contains a small amount of whitespace clean-up.
2019-10-08 13:45:20 +01:00
Michael Banther
75fea9ed84
Change the simulated interrupt pulse width from 100 us to 100 ms.
2019-10-08 13:44:04 +01:00
Michael Banther
34ebbc8509
Change the HID Report Descriptor to use the AC Search Usage instead of Voice Command.
2019-10-07 16:50:27 +01:00
Michael Banther
5b87efb5a7
Change the HID Report Descriptor to use the AC Search Usage instead of Voice Command.
2019-10-07 12:35:23 +01:00
larry
22323daa5f
Merge pull request #2 from michaelb/pendragon
...
HID -- Interrupt integration
2019-10-02 17:10:16 +01:00
Michael Banther
211a49f26f
Remove unnecessary port parameters passed through XUA Buffer (whether the traditional one or the Lite version).
2019-10-02 16:57:42 +01:00
Michael Banther
74564edde8
Add HID trigger function.
2019-10-02 16:55:42 +01:00
Michael Banther
e7e8b58275
Move user_hid.xc from lib_xua to the application (sw_xvf3510).
2019-10-02 16:54:38 +01:00
Michael Banther
ce24c73dc0
Change pre-processor symbol names to make them generic.
2019-10-02 16:51:46 +01:00
Michael Banther
0440020c2f
Change pre-processor symbol names to make them generic.
2019-10-02 15:24:28 +01:00
Michael Banther
17317093d5
Rework HID data processing.
...
Move port handling up into XUA_Buffer_lite2() to take advantage of its select operator. Add functions to initialise and set the HID data.
2019-10-01 17:04:13 +01:00
Michael Banther
2fb0bdfcc2
A slightly different way of saying the same thing.
...
I've changed to an if - else construct to make it easy to add in debugging print statements if needed.
2019-10-01 13:52:08 +01:00
Michael Banther
d32235d0f0
Final clean-up of HID -- NDP10x Interrupt integration.
2019-10-01 11:57:54 +01:00
Michael Banther
e1b72c47bc
Add a version of UserReadHIDData() which uses a signal on a port to set the Voice Command bit in the HID Report data.
...
This commit preserves the ability to simulate the NDP100 entirely, i.e. without using a port for input.
2019-09-30 16:14:16 +01:00
Michael Banther
660b483d1e
Clean up whitespace, no functional change.
2019-09-30 16:12:16 +01:00
Michael Banther
d7be8419d8
Add a 1b port for receiving the NDP10x interrupt.
2019-09-30 13:52:22 +01:00
Michael Banther
b68c192ad9
Updated change log
2019-09-26 16:29:53 +01:00
larry
0b30ba0cb7
Merge pull request #1 from michaelb/pendragon
...
Add UAC1 HID support for Voice Command detection
2019-09-26 15:32:02 +01:00
Michael Banther
37bbea3726
Use a consistent method to interpret the HID_CONTROLS pre-processor symbol throughout the code base.
2019-09-26 14:45:17 +01:00
Michael Banther
ba666fb314
Add a 100 ms assertion period when this demonstration code signals an NDP100 interrupt.
...
When testing with the Play/Pause Usage (0xCD) with a Mac as USB Host, adding in this assertion period produced reliable playing and pausing of the iTunes app every 10 seconds. Without an explicit assertion period, i.e. sending only one report with the lsb set to 1b followed by many reports with the lsb set to 0b, the iTunes app behaved as though it did not see many of the Play/Pause signals. The inclusion of an assertion period may or may not help when reporting Voice Command events on Andriod.
2019-09-26 14:27:20 +01:00
Michael Banther
9472bd7dce
Change HID usage from Play On-Off Control (OOC) to Voice Command One-Shot Control (OSC).
...
OSC requires relative data.
2019-09-26 14:22:17 +01:00
Michael Banther
3c86da7c09
Add demo HID code that simulates an interrupt roughly every 10 seconds.
2019-09-25 16:13:46 +01:00
Michael Banther
d491eb2da9
Change HID Report descriptor to contain one variable bit in the lsb position. This bit reports the interrupt. The remaining seven bits are constant at zero.
2019-09-25 16:12:59 +01:00
Michael Banther
960333ca09
Add the missing MSB of the maximum packet size and use hex values instead of decimal.
2019-09-25 14:38:17 +01:00
Michael Banther
3131b89a1d
Add HID descriptors for UAC1.
2019-09-25 11:46:16 +01:00
Michael Banther
958d52b5eb
Consistently use hex when defining descriptor values.
2019-09-25 11:45:40 +01:00
Michael Banther
35393d3739
Remove duplicate definitions.
2019-09-25 11:44:43 +01:00
Michael Banther
75422de6d1
Replace existing #ifdef HID_CONTROLS with #if( 0 < HID_CONTROLS ) to move to best practice regarding compile-time switches.
2019-09-25 11:42:59 +01:00