coursework

serial.h

Committer:
riyood
Date:
2016-11-27
Revision:
0:b7287557047e

File content as of revision 0:b7287557047e:

#ifndef _SERIAL_H
#define _SERIAL_H

#include "mbed.h"
#include "USBSerial.h"

// Virtual serial port over USB
class USB_Serial : public USBSerial {
public:
    void flush();

    /*  It seems original gets() does not work,
        probably due to the newline character. */
    int gets (char* str, int size);
};

extern USB_Serial serial;

#define BUFFER_SIZE 1000
extern char* buffer;

#endif