Corentin Potron / SerialHalfDuplex

Fork of SerialHalfDuplex by mbed unsupported

Committer:
cpotron
Date:
Wed Apr 25 17:13:38 2018 +0000
Revision:
2:242a54f3629b
Parent:
1:7ce196329ced
Commande des AX12 sur F303K8

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_unsupported 0:7802a25daf3b 1 #include "SerialHalfDuplex.h"
mbed_unsupported 0:7802a25daf3b 2
cpotron 2:242a54f3629b 3 SerialHalfDuplex::SerialHalfDuplex(PinName tx, PinName rx) : out(tx, NC, 1000000), in(NC, rx, 1000000) {
mbed_unsupported 0:7802a25daf3b 4
mbed_unsupported 0:7802a25daf3b 5 }
mbed_unsupported 0:7802a25daf3b 6
cpotron 2:242a54f3629b 7 int SerialHalfDuplex::putc(int byte) {
cpotron 2:242a54f3629b 8 out.putc(byte);
cpotron 2:242a54f3629b 9 while(in.readable()) {
cpotron 2:242a54f3629b 10 in.getc();
cpotron 2:242a54f3629b 11 }
mbed_unsupported 0:7802a25daf3b 12 }
mbed_unsupported 0:7802a25daf3b 13
cpotron 2:242a54f3629b 14 int SerialHalfDuplex::getc() {
cpotron 2:242a54f3629b 15 return 0;
cpotron 2:242a54f3629b 16 }