projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ed02a9
)
application: Extract time and position from GPS NMEA messages.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 30 Dec 2019 10:39:26 +0000
(11:39 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 6 Jan 2020 09:45:34 +0000
(10:45 +0100)
src/application/main.rs
patch
|
blob
|
history
diff --git
a/src/application/main.rs
b/src/application/main.rs
index edb234eae4fafe355e3541c1dbdfb9cb80c52ddc..dbd748c8e28013e25f5c62afdd8f24d68251ba86 100644
(file)
--- a/
src/application/main.rs
+++ b/
src/application/main.rs
@@
-39,6
+39,7
@@
use common::i2c;
use common::uart;
use common::usb_serial;
use common::display;
+use common::gps;
extern {
fn enable_interrupts();
@@
-99,11
+100,13
@@
pub unsafe extern "C" fn _start() -> ! {
nvic::enable_irq(12); // UART0
+ let mut gps = gps::Gps::new();
+
loop {
-
systick::delay_ms(1000
);
+
let mut tap = gps::TimeAndPos::new(
);
- cdc_tx_buf.write(b".\n");
- cdc_tx_buf.flush();
+ while gps.update(&mut tap) {
+ }
if (gpio::get(gpio::GPIOA) & (1 << 12)) == 0 {
nvic::system_reset();