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: 02_DPPU_JUANDA_120 02_DPPU_JUANDA_120_Latest_copy 02_DPPU_JUANDA_120_Latest
Revision 140:fd9fe498f142, committed 2017-04-20
- Comitter:
- mazgch
- Date:
- Thu Apr 20 08:44:47 2017 +0000
- Parent:
- 139:dafbbf31bf76
- Commit message:
- update for additional baud rate parameter in new mbed 5
Changed in this revision
--- a/GPS.cpp Thu Feb 25 13:22:34 2016 +0000
+++ b/GPS.cpp Thu Apr 20 08:44:47 2017 +0000
@@ -238,7 +238,7 @@
GPSSerial::GPSSerial(PinName tx /*= GPSTXD*/, PinName rx /*= GPSRXD*/, int baudrate /*= GPSBAUD*/,
int rxSize /*= 256*/, int txSize /*= 128*/) :
- SerialPipe(tx, rx, rxSize, txSize)
+ SerialPipe(tx, rx, baudrate, rxSize, txSize)
{
baud(baudrate);
#ifdef TARGET_UBLOX_C027
--- a/MDM.cpp Thu Feb 25 13:22:34 2016 +0000
+++ b/MDM.cpp Thu Apr 20 08:44:47 2017 +0000
@@ -2271,7 +2271,7 @@
PinName rts /*= MDMRTS*/, PinName cts /*= MDMCTS*/,
#endif
int rxSize /*= 256*/, int txSize /*= 128*/) :
- SerialPipe(tx, rx, rxSize, txSize)
+ SerialPipe(tx, rx, baudrate, rxSize, txSize)
{
if (rx == USBRX)
null.claim("r", stdin);
--- a/SerialPipe.cpp Thu Feb 25 13:22:34 2016 +0000
+++ b/SerialPipe.cpp Thu Apr 20 08:44:47 2017 +0000
@@ -1,7 +1,7 @@
#include "SerialPipe.h"
-SerialPipe::SerialPipe(PinName tx, PinName rx, int rxSize, int txSize) :
- _SerialPipeBase(tx,rx),
+SerialPipe::SerialPipe(PinName tx, PinName rx, int baudrate, int rxSize, int txSize) :
+ _SerialPipeBase(tx,rx,baudrate),
_pipeRx( (rx!=NC) ? rxSize : 0),
_pipeTx( (tx!=NC) ? txSize : 0)
{
--- a/SerialPipe.h Thu Feb 25 13:22:34 2016 +0000
+++ b/SerialPipe.h Thu Apr 20 08:44:47 2017 +0000
@@ -13,10 +13,11 @@
/** Constructor
\param tx the trasmitting pin
\param rx the receiving pin
+ \param baud the initial baudrate
\param rxSize the size of the receiving buffer
\param txSize the size of the transmitting buffer
*/
- SerialPipe(PinName tx, PinName rx, int rxSize = 128, int txSize = 128);
+ SerialPipe(PinName tx, PinName rx, int baudrate, int rxSize = 128, int txSize = 128);
/** Destructor
*/