The solution

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