Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 11u35_usbLocalFilesystem
Fork of USBDAP by
USBDAP Class Reference
USB HID device for CMSIS-DAP. More...
#include <USBDAP.h>
Public Member Functions | |
| USBDAP (const char *product="CMSIS-DAP", uint16_t vendor_id=0x1234, uint16_t product_id=0x0006, uint16_t product_release=0x0001, bool connect=true) | |
| Constructor. | |
| USBDAP (uint8_t output_report_length=64, uint8_t input_report_length=64, uint16_t vendor_id=0x1234, uint16_t product_id=0x0006, uint16_t product_release=0x0001, bool connect=true) | |
| 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 32 of file USBDAP.h.
Constructor & Destructor Documentation
| USBDAP | ( | const char * | product = "CMSIS-DAP", |
| uint16_t | vendor_id = 0x1234, |
||
| uint16_t | product_id = 0x0006, |
||
| uint16_t | product_release = 0x0001, |
||
| bool | connect = true |
||
| ) |
Constructor.
- Parameters:
-
product product name default: "CMSIS-DAP" vendor_id Your vendor_id product_id Your product_id product_release Your preoduct_release connect Connect the device
Definition at line 23 of file USBDAP.cpp.
| USBDAP | ( | uint8_t | output_report_length = 64, |
| uint8_t | input_report_length = 64, |
||
| uint16_t | vendor_id = 0x1234, |
||
| uint16_t | product_id = 0x0006, |
||
| uint16_t | product_release = 0x0001, |
||
| bool | connect = true |
||
| ) |
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) vendor_id Your vendor_id product_id Your product_id product_release Your preoduct_release connect Connect the device
Definition at line 32 of file USBDAP.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 65 of file USBDAP.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 77 of file USBDAP.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 54 of file USBDAP.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 59 of file USBDAP.cpp.
Generated on Sun Jul 24 2022 03:54:20 by
1.7.2
