![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
USB composite device example program, drag-and-drop flash writer.
Dependencies: SWD USBDevice mbed BaseDAP
USBMSD_LPC.h
- Committer:
- va009039
- Date:
- 2013-09-28
- Revision:
- 1:ea8e179320d7
- Parent:
- 0:2385683c867a
File content as of revision 1:ea8e179320d7:
// USBMSD_LPC.h 2013/9/26 #pragma once #include "USBMSD_Drop.h" #include "Target2.h" #include "Flash.h" /** drag-and-drop flash writer using the USBMSD class * * @code * #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 * } * @endcode */ class USBMSD_LPC : public USBMSD_Drop { public: /** create drag-and-drop flash writer * @param swd SWD interface */ USBMSD_LPC(SWD* swd, Serial* usbpc); virtual ~USBMSD_LPC() {} virtual void Drop(const uint8_t* data, int len, int offset, int total); protected: Target2* _target; Flash* _flash; Serial* _pc; };