use cortex_m::prelude::*; use embedded_hal::digital::v2::{OutputPin, ToggleableOutputPin}; use nb::{self, block}; use nmea0183::{ParseResult, Parser}; use stm32f1xx_hal::{ delay::Delay, gpio::{gpiob, gpioc, Alternate, Floating, Input, Output, PushPull}, prelude::*, serial::Serial, stm32, }; mod gps; mod setup; //use crate::exit; pub use setup::setup; use crate::time; pub struct App { delay: Delay, board_led: gpioc::PC13>, serial: Serial< stm32::USART3, ( gpiob::PB10>, gpiob::PB11>, ), >, gps_parser: Parser, } impl App { pub fn run(mut self) -> ! { defmt::info!("Application Startup!"); let mut last_ts = 0; loop { self.poll_gps(); } //exit(); } }