Set of Files to enable some Arduino examples.

Dependents:   TFT_Touch_botao_v1 TFT_Touch_exemplo5_git_touch TESTE_1 TFT_Touch_exemplo6_git_touch_button_3_

HardwareSerial.h

Committer:
davidprentice
Date:
2021-05-11
Revision:
2:81364824d56a
Parent:
0:5952bbaff1c6

File content as of revision 2:81364824d56a:

#ifndef HARDWARESERIAL_H_
#define HARDWARESERIAL_H_

#include "mbed.h"
#include <Serial.h>
#include "Print.h"

class HardwareSerial : public Print, Serial
{
public:
    HardwareSerial(PinName tx, PinName rx) : Serial(tx, rx) {}
    void begin(unsigned long baud)
    {
        Serial::baud(baud);
    }
    using Print::write; // pull in write(str) and write(buf, size) from Print
    //virtual size_t write(uint8_t);
    virtual size_t write(uint8_t c) { return Serial::_putc(c); }

private:
};

extern HardwareSerial serial_kbv;

#endif