Skip to content
Snippets Groups Projects
Commit 24ea531f authored by Dean Camera's avatar Dean Camera
Browse files

Update MediaController project to remove the Record usage (not often needed)...

Update MediaController project to remove the Record usage (not often needed) and explicitly declare each usage for maximum clarity.
parent b88e0a7b
Branches
Tags
No related merge requests found
......@@ -60,11 +60,13 @@
/** Size in bytes of each of the HID reporting IN. */
#define HID_EPSIZE 16
/* Enums: */
/** Enum for the HID report IDs used in the device. */
enum
{
HID_REPORTID_MouseReport = 0x01,
HID_REPORTID_KeyboardReport = 0x02,
HID_REPORTID_MouseReport = 0x01, /**< Report ID for the Mouse report within the device. */
HID_REPORTID_KeyboardReport = 0x02, /**< Report ID for the Keyboard report within the device. */
} HID_Report_IDs;
/* Function Prototypes: */
......
......@@ -105,6 +105,7 @@
* - <b>Benito</b> - Benito Board Arduino Programmer project
* - <b>LEDNotifier</b> - USB LED Notification project
* - <b>Magstripe</b> - Magnetic Stripe Card Reader project
* - <b>MediaController</b> - Media Playback Controller project
* - <b>MIDIToneGenerator</b> - MIDI Note Tone Generator project
* - <b>MissileLaucher</b> - Toy Missile Launcher Host project
* - <b>RelayBoard</b> - Relay board controller, controllable via the "sismpctl" Linux application
......
......@@ -48,20 +48,23 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM MediaControlReport[] =
HID_RI_USAGE_PAGE(8, 0x0C), /* Consumer Page */
HID_RI_USAGE(8, 0x01), /* Consumer Controls */
HID_RI_COLLECTION(8, 0x01), /* Application */
HID_RI_USAGE_MINIMUM(8, 0xB0),
HID_RI_USAGE_MAXIMUM(8, 0xB7),
HID_RI_USAGE(8, 0xB0), /* Play */
HID_RI_USAGE(8, 0xB1), /* Pause */
HID_RI_USAGE(8, 0xB3), /* Fast Forward */
HID_RI_USAGE(8, 0xB4), /* Rewind */
HID_RI_USAGE(8, 0xB5), /* Next Track */
HID_RI_USAGE(8, 0xB6), /* Previous Track */
HID_RI_USAGE(8, 0xB7), /* Stop */
HID_RI_USAGE(8, 0xCD), /* Play/Pause (toggle) */
HID_RI_USAGE(8, 0xE2), /* Mute */
HID_RI_USAGE(8, 0xE9), /* Volume Up */
HID_RI_USAGE(8, 0xEA), /* Volume Down */
HID_RI_REPORT_SIZE(8, 0x01),
HID_RI_REPORT_COUNT(8, 0x0B),
HID_RI_LOGICAL_MINIMUM(8, 0),
HID_RI_LOGICAL_MAXIMUM(8, 1),
HID_RI_REPORT_SIZE(8, 0x01),
HID_RI_REPORT_COUNT(8, 0x08),
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE),
HID_RI_USAGE(8, 0xCD),
HID_RI_USAGE(8, 0xE2),
HID_RI_USAGE(8, 0xE9),
HID_RI_USAGE(8, 0xEA),
HID_RI_REPORT_COUNT(8, 0x04),
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE),
HID_RI_REPORT_COUNT(8, 0x04),
HID_RI_REPORT_COUNT(8, 0x05),
HID_RI_INPUT(8, HID_IOF_CONSTANT),
HID_RI_END_COLLECTION(0),
};
......
......@@ -74,7 +74,6 @@
{
unsigned Play : 1;
unsigned Pause : 1;
unsigned Record : 1;
unsigned FForward : 1;
unsigned Rewind : 1;
unsigned NextTrack : 1;
......@@ -84,7 +83,7 @@
unsigned Mute : 1;
unsigned VolumeUp : 1;
unsigned VolumeDown : 1;
unsigned PADDING : 4;
unsigned RESERVED : 5;
} ATTR_PACKED USB_MediaReport_Data_t;
/* Function Prototypes: */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment