Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3_cpp_extensions.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisin D.A <mrlisdim@gmail.com>2018-12-07 15:29:50 +0300
committerLisin D.A <mrlisdim@gmail.com>2018-12-07 15:29:50 +0300
commit4429f37952efe8920c4c9e7b3d560e3591e9b403 (patch)
treef9abb843ebf0073dae00d4d994a8959fcb0afb63
parent56e8682296bcba423f50e358cf9e4995b68eda3a (diff)
Add a TC flag clearing
-rw-r--r--cm3cpp_usart.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cm3cpp_usart.h b/cm3cpp_usart.h
index d4b2995..d131647 100644
--- a/cm3cpp_usart.h
+++ b/cm3cpp_usart.h
@@ -150,6 +150,8 @@ public:
usart_get_flag(_usart, USART_SR_TC));
}
+ void clear_tc_flag() { USART_SR(_usart) = ~USART_SR_TC; }
+
void enable_irq() {
nvic_enable_irq(_usart_nvic);
}