USB composite device example program, drag-and-drop flash writer.
Dependencies: SWD USBDevice mbed BaseDAP
USB_HID Class Reference
USB HID device for CMSIS-DAP. More...
#include <USB_HID.h>
Public Member Functions | |
USB_HID (USBDevice *device, uint8_t output_report_length=64, uint8_t input_report_length=64) | |
Constructor. | |
bool | send (HID_REPORT *report) |
Send a Report. | |
bool | sendNB (HID_REPORT *report) |
Send a Report. | |
bool | read (HID_REPORT *report) |
Read a report: blocking. | |
bool | readNB (HID_REPORT *report) |
Read a report: non blocking. |
Detailed Description
USB HID device for CMSIS-DAP.
Definition at line 34 of file USB_HID.h.
Constructor & Destructor Documentation
USB_HID | ( | USBDevice * | device, |
uint8_t | output_report_length = 64 , |
||
uint8_t | input_report_length = 64 |
||
) |
Constructor.
- Parameters:
-
output_report_length Maximum length of a sent report (up to 64 bytes) (default: 64 bytes) input_report_length Maximum length of a received report (up to 64 bytes) (default: 64 bytes)
Definition at line 22 of file USB_HID.cpp.
Member Function Documentation
bool read | ( | HID_REPORT * | report ) |
Read a report: blocking.
- Parameters:
-
report pointer to the report to fill
- Returns:
- true if successful
Definition at line 38 of file USB_HID.cpp.
bool readNB | ( | HID_REPORT * | report ) |
Read a report: non blocking.
- Parameters:
-
report pointer to the report to fill
- Returns:
- true if successful
Definition at line 49 of file USB_HID.cpp.
bool send | ( | HID_REPORT * | report ) |
Send a Report.
warning: blocking
- Parameters:
-
report Report which will be sent (a report is defined by all data and the length)
- Returns:
- true if successful
Definition at line 28 of file USB_HID.cpp.
bool sendNB | ( | HID_REPORT * | report ) |
Send a Report.
warning: non blocking
- Parameters:
-
report Report which will be sent (a report is defined by all data and the length)
- Returns:
- true if successful
Definition at line 33 of file USB_HID.cpp.
Generated on Wed Jul 13 2022 08:08:25 by 1.7.2