Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This patch addresses issue #27 wherein USART configuration fails if no other mode was selected prior to that. This is done by permitting the mode to be set multiple times, even if it is the same mode. Initially, the USART is in the default USART mode but has not actually been configured. Therefore the `enter_mode` routine will exit early and skip configuration entirely unless care is taken and a dummy reconfiguration step is done before switching to USART. The consequence of not performing this check is that the bus configuration will reset and possibly glitch momentarily if the same mode is setup twice, but that should not be done anyhow and has not been encouraged as far as I can tell. Co-authored-by: Michał Fita <4925040+michalfita@users.noreply.github.com>
- Loading branch information