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: USBMSD_LPC_HelloWorld lpcterm2 Simple-CMSIS-DAP 11u35_usbLocalFilesystem
BaseDAP Class Reference
DAP(Debug Access Port) interface. More...
#include <BaseDAP.h>
Public Member Functions | |
| BaseDAP (SWD *swd) | |
| Create a DAP(Debug Access Port) interface. | |
| int | Command (uint8_t *request, uint8_t *response) |
| Process command. | |
Protected Member Functions | |
| virtual void | infoLED (int select, int value) |
| LED indicator. | |
| virtual int | Vendor (uint8_t *request, uint8_t *response) |
| vendor command | |
Detailed Description
DAP(Debug Access Port) interface.
Example:
#include "BaseDAP.h" #include "USBDAP.h" USBDAP hid(64, 64, 0x0d28, 0x0204); SWD swd(p21,p22,p17); // SWDIO(dp12),SWCLK(dp3),nReset(dp23) DigitalOut connected(LED1); DigitalOut running(LED2); class myDAP : public BaseDAP { public: myDAP(SWD* swd):BaseDAP(swd){}; virtual void infoLED(int select, int value) { switch(select) { case 0: connected = value; break; case 1: running = value; break; } } }; int main() { HID_REPORT recv_report; HID_REPORT send_report; myDAP* dap = new myDAP(&swd); while(1) { if(hid.readNB(&recv_report)) { dap->Command(recv_report.data, send_report.data); send_report.length = 64; hid.send(&send_report); } } }
Definition at line 54 of file BaseDAP.h.
Constructor & Destructor Documentation
| BaseDAP | ( | SWD * | swd ) |
Create a DAP(Debug Access Port) interface.
- Parameters:
-
swd assign SWD interface
Definition at line 4 of file BaseDAP.cpp.
Member Function Documentation
| int Command | ( | uint8_t * | request, |
| uint8_t * | response | ||
| ) |
Process command.
- Parameters:
-
request request data(64 bytes) response response data(64 bytes)
- Returns:
- response length
Definition at line 12 of file BaseDAP.cpp.
| void infoLED | ( | int | select, |
| int | value | ||
| ) | [protected, virtual] |
LED indicator.
- Parameters:
-
selct 0...connected LED, 1...running LED value 0...OFF, 1...ON
Definition at line 91 of file BaseDAP.cpp.
| int Vendor | ( | uint8_t * | request, |
| uint8_t * | response | ||
| ) | [protected, virtual] |
vendor command
Definition at line 210 of file BaseDAP.cpp.
Generated on Mon Jul 18 2022 08:44:24 by
1.7.2