Eng Riyadh / mbed_function
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers serial.h Source File

serial.h

00001 #ifndef _SERIAL_H
00002 #define _SERIAL_H
00003 
00004 #include "mbed.h"
00005 #include "USBSerial.h"
00006 
00007 // Virtual serial port over USB
00008 class USB_Serial : public USBSerial {
00009 public:
00010     void flush();
00011 
00012     /*  It seems original gets() does not work,
00013         probably due to the newline character. */
00014     int gets (char* str, int size);
00015 };
00016 
00017 extern USB_Serial serial;
00018 
00019 #define BUFFER_SIZE 1000
00020 extern char* buffer;
00021 
00022 #endif