From ce5666c12eb4333fd71adb58d8d5ad740fcffe8b Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Fri, 20 Dec 2019 21:10:18 +0100 Subject: [PATCH] application: Initialize and clear the display on startup. --- src/application/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/application/main.rs b/src/application/main.rs index 39e0e02..b1bf3af 100644 --- a/src/application/main.rs +++ b/src/application/main.rs @@ -35,6 +35,7 @@ use common::gpio; use common::nvic; use common::i2c; use common::usb_serial; +use common::display; extern { fn enable_interrupts(); @@ -72,6 +73,11 @@ pub unsafe extern fn main() { cdc_tx_buf.write(b"\n"); cdc_tx_buf.flush(); + let mut display = display::Display::new(gpio::GPIOB, 1 << 16, 0x3c); + + display.init(); + display.clear(); + loop { systick::delay_ms(1000); -- 2.30.2