Simon Ford
/
baud
Example of setting stdout baudrate
Diff: main.cpp
- Revision:
- 0:2c059aa102cb
diff -r 000000000000 -r 2c059aa102cb main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Sep 04 19:33:05 2012 +0000 @@ -0,0 +1,11 @@ +#include "mbed.h" + +void baud(int baudrate) { + Serial s(USBTX, USBRX); + s.baud(baudrate); +} + +int main() { + baud(115200); + printf("Hello, faster world!"); +}