summaryrefslogtreecommitdiff
path: root/drivers/gps.cpp
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-12-03 20:18:53 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-12-03 20:18:53 +0100
commitd0a7ee402141d6703218765c36a47003538168d1 (patch)
tree4943107590772281dc78937e096c280d23147ecd /drivers/gps.cpp
parent229fd5405eef950e60cae3b6f446c146f38a2e13 (diff)
Moved USART register definitions into seperate header and added abstraction layer.
Diffstat (limited to 'drivers/gps.cpp')
-rw-r--r--drivers/gps.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gps.cpp b/drivers/gps.cpp
index 1ae3684..cdbb7ad 100644
--- a/drivers/gps.cpp
+++ b/drivers/gps.cpp
@@ -9,7 +9,7 @@ void interrupt<Interrupt::USART3>() {
void GPS::irq() {
- uint8_t c = USART3.DR;
+ uint8_t c = USART3.recv();
if(!incomplete_msg) {
incomplete_msg = msg_pool.create();
@@ -31,7 +31,7 @@ void GPS::irq() {
incomplete_msg->buf[incomplete_msg->n++] = c;
if(c == '\n') {
- GPIOB.ODR ^= 1 << 1;
+ //GPIOB.ODR ^= 1 << 1;
const_cast<P<GPSMsg>&>(complete_msg) = incomplete_msg;
incomplete_msg.reset();