The solution
1. #![deny(unsafe_code)]
2. #![no_main]
3. #![no_std]
5. use aux8::entry;
7. #[entry]
8. fn main() -> ! {
9. let (gpioe, rcc) = aux8::init();
11. // enable the GPIOE peripheral
12. rcc.ahbenr.modify(|_, w| w.iopeen().set_bit());
14. // configure the pins as outputs
15. gpioe.moder.modify(|_, w| {
16. w.moder8().output();
17. w.moder9().output();
18. w.moder10().output();
19. w.moder11().output();
20. w.moder12().output();
21. w.moder13().output();
22. w.moder14().output();
23. w.moder15().output()
24. });
26. // Turn on all the LEDs in the compass
27. gpioe.odr.write(|w| {
28. w.odr8().set_bit();
29. w.odr9().set_bit();
30. w.odr10().set_bit();
31. w.odr11().set_bit();
32. w.odr12().set_bit();
33. w.odr13().set_bit();
34. w.odr14().set_bit();
35. w.odr15().set_bit()
36. });
38. aux8::bkpt();
40. loop {}
41. }