summaryrefslogtreecommitdiff
path: root/usart.h
diff options
context:
space:
mode:
Diffstat (limited to 'usart.h')
-rw-r--r--usart.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/usart.h b/usart.h
index 6c145c6..ab7fb3f 100644
--- a/usart.h
+++ b/usart.h
@@ -4,7 +4,7 @@
template<>
void interrupt<Interrupt::USART1>() {
USART1.DR;
- GPIOA.ODR ^= 1 << 5;
+ //GPIOB.ODR ^= 1 << 1;
}
void usart_enable() {
@@ -16,7 +16,9 @@ void usart_enable() {
}
void usart_send(uint8_t data) {
- while(!(USART1.SR & 0x80)); // Wait for TXE.
+ while(!(USART1.SR & 0x80)) {
+ Thread::yield();
+ } // Wait for TXE.
USART1.DR = data;
}