diff options
author | Nico <NicoHood@users.noreply.github.com> | 2015-09-24 12:03:55 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-09-28 16:30:39 +0200 |
commit | 1be98bd7d50d8fa10b5a69987985149059bde790 (patch) | |
tree | 7108a94602c9a2e533f12d82d89466a690a5a2f1 | |
parent | 948c73c5e376a6c80b79b2b74ecac821f2b66c58 (diff) |
Fix compiler warning in CDC.cpp
-rw-r--r-- | cores/arduino/CDC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp index 7168408..f19b44c 100644 --- a/cores/arduino/CDC.cpp +++ b/cores/arduino/CDC.cpp @@ -236,9 +236,11 @@ Serial_::operator bool() { unsigned long Serial_::baud() { // Disable interrupts while reading a multi-byte value + uint32_t baudrate; ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { - return _usbLineInfo.dwDTERate; + baudrate = _usbLineInfo.dwDTERate; } + return baudrate; } uint8_t Serial_::stopbits() { |