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.
Dependencies: SWD USBDevice mbed BaseDAP
USBMSD_LPC Class Reference
drag-and-drop flash writer using the USBMSD class More...
#include <USBMSD_LPC.h>
Inherits USBMSD_Drop.
| Public Member Functions | |
| USBMSD_LPC (SWD *swd, Serial *usbpc) | |
| create drag-and-drop flash writer | |
| virtual void | Drop (const uint8_t *data, int len, int offset, int total) | 
| drag-and-drop file received | |
| void | attach (void(*fptr)(const uint8_t *data, int len, int offset, int total)) | 
| Attach a callback for when a file is received. | |
Detailed Description
drag-and-drop flash writer using the USBMSD class
#include "mbed.h" #include "USBMSD_LPC.h" Serial pc(USBTX, USBRX); SWD swd(PTB8,PTB9,PTB10); // SWDIO(dp12),SWCLK(dp3),nReset(dp23) int main() { USBMSD_LPC* LPC1114 = new USBMSD_LPC(&swd, &pc); while(1); // forever }
Definition at line 21 of file USBMSD_LPC.h.
Constructor & Destructor Documentation
| USBMSD_LPC | ( | SWD * | swd, | 
| Serial * | usbpc | ||
| ) | 
create drag-and-drop flash writer
- Parameters:
- 
  swd SWD interface 
Definition at line 17 of file USBMSD_LPC.cpp.
Member Function Documentation
| void attach | ( | void(*)(const uint8_t *data, int len, int offset, int total) | fptr ) |  [inherited] | 
Attach a callback for when a file is received.
- Parameters:
- 
  fptr function pointer 
Definition at line 17 of file USBMSD_Drop.cpp.
| void Drop | ( | const uint8_t * | data, | 
| int | len, | ||
| int | offset, | ||
| int | total | ||
| ) |  [virtual] | 
drag-and-drop file received
- Parameters:
- 
  data received data pointer len data length offset offset from file top total total file size 
Reimplemented from USBMSD_Drop.
Definition at line 24 of file USBMSD_LPC.cpp.
Generated on Wed Jul 13 2022 08:08:25 by
 1.7.2
 1.7.2