From d0a7ee402141d6703218765c36a47003538168d1 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 3 Dec 2011 20:18:53 +0100 Subject: Moved USART register definitions into seperate header and added abstraction layer. --- drivers/gps.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gps.h') diff --git a/drivers/gps.h b/drivers/gps.h index 786b719..16a971b 100644 --- a/drivers/gps.h +++ b/drivers/gps.h @@ -2,7 +2,7 @@ #define GPS_H #include "rcc.h" -#include "stm32.h" +#include "usart.h" #include "interrupt.h" #include "thread.h" @@ -37,8 +37,8 @@ class GPS { void enable() { RCC.enable(RCC.USART3); - USART3.BRR = 7500; // 4800 baud - USART3.CR1 = 0x202c; + USART3.set_baudrate(4800); + USART3.enable(); Interrupt::enable(Interrupt::USART3); } -- cgit v1.2.3