projects
/
gps-watch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
application: Define UART0_IRQHandler().
[gps-watch.git]
/
src
/
application
/
main.rs
diff --git
a/src/application/main.rs
b/src/application/main.rs
index 39e0e022014463e956cc8add88e4d824b510af02..dffa4ee189ebeb1e724057499e0a0b095519b05f 100644
(file)
--- a/
src/application/main.rs
+++ b/
src/application/main.rs
@@
-22,11
+22,13
@@
*/
#![no_std]
*/
#![no_std]
-#![
crate_type="staticlib"
]
+#![
no_main
]
#[link(name="libcommon.rlib")]
extern crate common;
#[link(name="libcommon.rlib")]
extern crate common;
+mod uart0;
+
use common::buffer::Buffer;
use common::clock;
use common::systick;
use common::buffer::Buffer;
use common::clock;
use common::systick;
@@
-35,6
+37,7
@@
use common::gpio;
use common::nvic;
use common::i2c;
use common::usb_serial;
use common::nvic;
use common::i2c;
use common::usb_serial;
+use common::display;
extern {
fn enable_interrupts();
extern {
fn enable_interrupts();
@@
-43,8
+46,9
@@
extern {
}
#[no_mangle]
}
#[no_mangle]
-pub unsafe extern
fn main()
{
+pub unsafe extern
"C" fn _start() -> !
{
clock::configure();
clock::configure();
+ clock::enable_osc0();
systick::init();
port::init();
systick::init();
port::init();
@@
-72,6
+76,11
@@
pub unsafe extern fn main() {
cdc_tx_buf.write(b"\n");
cdc_tx_buf.flush();
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);
loop {
systick::delay_ms(1000);