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: 4DGL-UC MODSERIAL mbed mbos
Fork of CDU_Mbed_30 by
USB_setup.cpp
- Committer:
- LvdK
- Date:
- 2012-12-08
- Revision:
- 5:99594f4ab659
- Parent:
- 0:6f71ca095e78
File content as of revision 5:99594f4ab659:
//
#include "mbed.h"
Serial USB(USBTX, USBRX); // : declare USB communication defined by Mbed USB TX and RX lines
void char_received();
void init_USB()
{ // -- This function is the setup for the USB communication --
// Function char_received() is attached to Rx interrupt.
USB.baud(38400); // set initial baudrate to 38400
USB.attach(&char_received); // : attach function
}
