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.
Dependents: Nucleo_NHK_2018_syudo_wheel a_team_R1370 Nucleo_NHK_2018_syudo_wheel 2018NHK_gaku_ver2 ... more
Revision 7:ca2a6fdb24af, committed 2019-09-05
- Comitter:
- highfieldsnj
- Date:
- Thu Sep 05 01:42:25 2019 +0000
- Parent:
- 6:7f87c3ff29ef
- Child:
- 8:a5d4fe088b23
- Commit message:
- default baud is 115200
Changed in this revision
| SerialMultiByte.cpp | Show annotated file Show diff for this revision Revisions of this file |
| SerialMultiByte.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/SerialMultiByte.cpp Sat Oct 06 14:35:07 2018 +0900
+++ b/SerialMultiByte.cpp Thu Sep 05 01:42:25 2019 +0000
@@ -1,10 +1,15 @@
#include "SerialMultiByte.h"
-SerialMultiByte::SerialMultiByte(PinName tx, PinName rx) : RawSerial(tx, rx) {
+SerialMultiByte::SerialMultiByte(PinName tx, PinName rx) : RawSerial(tx, rx, DEFAULT_BAUD) {
header[0] = DEFAULT_FIRST_HEADER;
header[1] = DEFAULT_SECOND_HEADER;
}
+SerialMultiByte::SerialMultiByte(PinName tx, PinName rx, int baud) : RawSerial(tx, rx, baud) {
+ header[0] = DEFAULT_FIRST_HEADER;
+ header[1] = DEFAULT_SECOND_HEADER;
+}
+
void SerialMultiByte::setHeaders(uint8_t firstHeader, uint8_t secondHeader) {
header[0] = firstHeader;
header[1] = secondHeader;
--- a/SerialMultiByte.h Sat Oct 06 14:35:07 2018 +0900
+++ b/SerialMultiByte.h Thu Sep 05 01:42:25 2019 +0000
@@ -11,6 +11,7 @@
class SerialMultiByte : public RawSerial {
public:
SerialMultiByte(PinName tx, PinName rx);
+ SerialMultiByte(PinName tx, PinName rx, int baud);
void setHeaders(uint8_t firstHeader, uint8_t secondHeader);
void setHeaders(uint8_t headers[]);