AdaCore / Ada_Drivers_Library

Ada source code and complete sample GNAT projects for selected bare-board platforms supported by GNAT.
BSD 3-Clause "New" or "Revised" License
240 stars 141 forks source link

MicroBit: Fix button B #268

Closed Fabien-Chouteau closed 6 years ago

Fabien-Chouteau commented 6 years ago

As discussed in #267, MicroBit.Time was configuring the Low Frequency Clock to use an external crystal, but there is no LFC external crystal on the micro:bit. Also the button B is connected to the pin used for the LFC crystal, so this configuration meant the pin was actually not available as GPIO for the button code.

MicroBit.Time now uses synthesized clock for LFC so the pin is available for button B.

Fabien-Chouteau commented 6 years ago

Ping @simonjwright :)

simonjwright commented 6 years ago

Great, that was quick! (I assume you have a test program? I don’t, not in Ada_Drivers_Library, I was working on cortex-gnat-rts)

Fabien-Chouteau commented 6 years ago

I'm actually working on micro:bit examples, so I'll add one for the buttons.