Kazuki Yamamoto / USBDAP

Dependents:   11u35_usbLocalFilesystem

Fork of USBDAP by Norimasa Okamoto

Embed: (wiki syntax)

« Back to documentation index

USBDAP Class Reference

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:
productproduct name default: "CMSIS-DAP"
vendor_idYour vendor_id
product_idYour product_id
product_releaseYour preoduct_release
connectConnect 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_lengthMaximum length of a sent report (up to 64 bytes) (default: 64 bytes)
input_report_lengthMaximum length of a received report (up to 64 bytes) (default: 64 bytes)
vendor_idYour vendor_id
product_idYour product_id
product_releaseYour preoduct_release
connectConnect the device

Definition at line 32 of file USBDAP.cpp.


Member Function Documentation

bool read ( HID_REPORT *  report )

Read a report: blocking.

Parameters:
reportpointer 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:
reportpointer 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:
reportReport 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:
reportReport 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.