commit | 0d611018230f1584c86838a762e1d2135ad49cf7 | [log] [tgz] |
---|---|---|
author | Armando Montanez <amontanez@google.com> | Thu Aug 13 15:06:29 2020 -0700 |
committer | CQ Bot Account <commit-bot@chromium.org> | Thu Aug 13 22:34:40 2020 +0000 |
tree | 1be9d36bbf4f36f9e676ccff43b2350f61c85525 | |
parent | ba43a3c20359f668725f44444a5ee67feeaa5735 [diff] |
pw_sys_io: Fix stm32f429i ReadByte() If you make an infinite loop without a break or return, it is infinite. Probably not intended behavior. :) Present me is disappointed in past me. Change-Id: I03c7dffaa08f2ca64552433552888916ac7af6a6 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16000 Reviewed-by: Shane Gomindes <shaneajg@google.com> Commit-Queue: Armando Montanez <amontanez@google.com>
diff --git a/pw_sys_io_baremetal_stm32f429/sys_io_baremetal.cc b/pw_sys_io_baremetal_stm32f429/sys_io_baremetal.cc index 7865693..74531ef 100644 --- a/pw_sys_io_baremetal_stm32f429/sys_io_baremetal.cc +++ b/pw_sys_io_baremetal_stm32f429/sys_io_baremetal.cc
@@ -173,6 +173,7 @@ while (true) { if (usart1.status & kReadDataReady) { *dest = static_cast<std::byte>(usart1.data_register); + break; } } return Status::OK;