Skip to content

Commit 3740aa4

Browse files
committed
updated per comments
1 parent e706d38 commit 3740aa4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cores/rp2040/SerialUART.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ void SerialUART::begin(unsigned long baud, uint16_t config) {
239239
gpio_set_inover(_cts, _invertControl ? 1 : 0);
240240
}
241241

242-
_achievedBaud = uart_init(_uart, baud);
242+
_actualBaud = uart_init(_uart, baud);
243243
int bits, stop;
244244
uart_parity_t parity;
245245
switch (config & SERIAL_PARITY_MASK) {

cores/rp2040/SerialUART.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ class SerialUART : public arduino::HardwareSerial {
9494
bool getBreakReceived();
9595

9696
// Returns the baud rate the uart is actually operating at vs the desired baud rate specified to begin()
97-
int getAcheivedBaud() {
98-
return _achievedBaud;
97+
int getActualBaud() {
98+
return _running ? _actualBaud : 0;
9999
}
100100

101101
private:
@@ -105,7 +105,7 @@ class SerialUART : public arduino::HardwareSerial {
105105
pin_size_t _rts, _cts;
106106
gpio_function_t _fcnTx, _fcnRx, _fcnRts, _fcnCts;
107107
int _baud;
108-
int _achievedBaud;
108+
int _actualBaud;
109109
mutex_t _mutex;
110110
bool _polling = false;
111111
bool _overflow;

0 commit comments

Comments
 (0)