Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SoftSerial SDFileSystem mbed wave_player
MySoftSerial.cpp
- Committer:
- Thomas Cauwelier
- Date:
- 2017-05-10
- Revision:
- 17:8683abdc1912
- Parent:
- 16:1a0589d846bf
- Child:
- 19:822d93e0bf34
File content as of revision 17:8683abdc1912:
//
// Created by thoma on 10-May-17.
//
#include "MySoftSerial.h"
#include "Manchester.h"
MySoftSerial::MySoftSerial(PinName TX, PinName RX, const char *name) : SoftSerial(TX, RX, name) {
format(16, SoftSerial::None, 1);
}
MySoftSerial::~MySoftSerial() {
}
int MySoftSerial::putc(int c) {
c = Manchester::encode(c);
return _putc(c);
}
int MySoftSerial::getc() {
return Manchester::decode(_getc());
}
void MySoftSerial::prepare_tx(int c) {
SoftSerial::prepare_tx(c);
}
void MySoftSerial::baud(int baudrate) {
SoftSerial::baud(baudrate);
}
int MySoftSerial::readable() {
return SoftSerial::readable();
}
int MySoftSerial::writeable() {
return SoftSerial::writeable();
}