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:
25e9712
)
bootloader: configure PTE24 for push button use.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 7 Jul 2019 18:29:05 +0000
(20:29 +0200)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 5 Jan 2020 19:38:11 +0000
(20:38 +0100)
src/bootloader/main.rs
patch
|
blob
|
history
diff --git
a/src/bootloader/main.rs
b/src/bootloader/main.rs
index 0f863fc4af6338c033edb1df7f847c7465196ce1..2e43b67eb9dc3762f3301d39d07ecdc79090fe45 100644
(file)
--- a/
src/bootloader/main.rs
+++ b/
src/bootloader/main.rs
@@
-32,6
+32,8
@@
mod bootloader;
use common::clock;
use common::systick;
+use common::port;
+use common::gpio;
use common::usb_serial;
extern {
@@
-45,6
+47,11
@@
pub unsafe extern fn main() {
clock::configure();
systick::init();
+ // Configure lower left push button.
+ gpio::set_direction(gpio::GPIOE, 1 << 24, gpio::Direction::Input);
+ port::set_af(port::PORTE, 24, 1);
+ port::set_pull(port::PORTE, 24, port::Pull::Up);
+
if true {
usb_serial::init(0xf055, 0x635c);