From 025a38a1f743fd9e89cbd477abe3f79a8d098097 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 19 Nov 2011 17:21:31 +0100 Subject: Moved os and hal related files into subdirectories. --- usart.h | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 usart.h (limited to 'usart.h') diff --git a/usart.h b/usart.h deleted file mode 100644 index 8fde39a..0000000 --- a/usart.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef USART_H -#define USART_H - -template<> -void interrupt() { - USART1.DR; - //GPIOB.ODR ^= 1 << 1; -} - -void usart_enable() { - RCC.enable(RCC.USART1); - USART1.BRR = 625; // 115200 baud - USART1.CR1 = 0x202c; - - Interrupt::enable(Interrupt::USART1); -} - -void usart_send(uint8_t data) { - while(!(USART1.SR & 0x80)) { - Thread::yield(); - } // Wait for TXE. - - USART1.DR = data; -} - -#endif -- cgit v1.2.3