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
236 stars 141 forks source link

Fixes broken interrupt prio on cm0, now compat w/ cm4_7 #330

Closed nocko closed 3 years ago

nocko commented 4 years ago

In my travels trying to make the cm4_7 and cm_0 NVIC APIs compatible, I found out that the cm0 Set_Priority was broken. It neglected to shift left the priority as required, so for the microbit examples, all interrupts were priority 0 (the least significant 6 bits of the prio ignore writes).

The Set_Priority API is compatible between implementations now, an as a bonus, the cm_0 implementation will warn if you specify an out of range priority.

nocko commented 4 years ago

@Fabien-Chouteau You've addressed most of this in your work yesterday, I'll rebase the bugfix on master once those changes land.

Fabien-Chouteau commented 3 years ago

Hello @nocko, can you rebase your change?

Fabien-Chouteau commented 3 years ago

Fixed in #373