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_

Committer:
davidprentice
Date:
Mon Apr 26 14:52:27 2021 +0000
Revision:
0:5952bbaff1c6
initial set of files to enable Arduino examples

Who changed what in which revision?

UserRevisionLine numberNew contents of line
davidprentice 0:5952bbaff1c6 1 #ifndef HARDWARESERIAL_H_
davidprentice 0:5952bbaff1c6 2 #define HARDWARESERIAL_H_
davidprentice 0:5952bbaff1c6 3
davidprentice 0:5952bbaff1c6 4 #include "mbed.h"
davidprentice 0:5952bbaff1c6 5 #include <Serial.h>
davidprentice 0:5952bbaff1c6 6 #include "Print.h"
davidprentice 0:5952bbaff1c6 7
davidprentice 0:5952bbaff1c6 8 class HardwareSerial : public Print, Serial
davidprentice 0:5952bbaff1c6 9 {
davidprentice 0:5952bbaff1c6 10 public:
davidprentice 0:5952bbaff1c6 11 HardwareSerial(PinName tx, PinName rx) : Serial(tx, rx) {}
davidprentice 0:5952bbaff1c6 12 void begin(unsigned long baud)
davidprentice 0:5952bbaff1c6 13 {
davidprentice 0:5952bbaff1c6 14 Serial::baud(baud);
davidprentice 0:5952bbaff1c6 15 }
davidprentice 0:5952bbaff1c6 16 using Print::write; // pull in write(str) and write(buf, size) from Print
davidprentice 0:5952bbaff1c6 17 //virtual size_t write(uint8_t);
davidprentice 0:5952bbaff1c6 18 virtual size_t write(uint8_t c) { return Serial::_putc(c); }
davidprentice 0:5952bbaff1c6 19
davidprentice 0:5952bbaff1c6 20 private:
davidprentice 0:5952bbaff1c6 21 };
davidprentice 0:5952bbaff1c6 22
davidprentice 0:5952bbaff1c6 23 extern HardwareSerial serial_kbv;
davidprentice 0:5952bbaff1c6 24
davidprentice 0:5952bbaff1c6 25 #endif