This is a simple Generic HID demo, which is more or less compatible with the USB HID PnP demo example from the Microchip Applications Library, so that the PC application from that package can be used with our firmware as well (after two small modification). The differences: 1. We use 12 bit ADC resolution (instead of 10 bit) 2. We use Vid=0x0483, Pid=0x5750 which are the official STM32 Custom Human Interface Device identifiers from ST Microelectronics.

Dependencies:   USBDevice mbed

Revision:
1:86e3171a1f42
Parent:
0:471646bf5f7e
--- a/main.cpp	Thu Jun 16 12:51:10 2022 +0000
+++ b/main.cpp	Tue Sep 20 05:57:25 2022 +0000
@@ -22,9 +22,9 @@
 HID_REPORT send_report;          //This report will contain data to be sent
 HID_REPORT recv_report;          //This report will contain data received
 
-DigitalOut LED_1(LED1);          //Buitin KED at PA5
-DigitalIn SW1(BUTTON1,PullUp);   //Builtin button at PC13
-AnalogIn adc(A0);                //Analog input at A0 (PA0)
+DigitalOut LED_1(LED1);          //Buitin LED at PA_5
+DigitalIn SW1(BUTTON1,PullUp);   //Builtin button at PC_13
+AnalogIn adc(A0);                //Analog input at A0 (PA_0)
 
 int main(void) {
     uint16_t val = 0;