Tasking with interrupts

The Solar_System API is not working anymore

The purpose of this exercise is to implement a handler on the button’s interrupt

_images/05_1.png

Expected result

Question 1

Implement the protected object Button in the My_Button package.

This protected object should have an interrupt handler called Interrupt_Handler that will be called each time the interrupt occurs.

In addition, implement the Wait_Press protected entry that will be used to know when the button has been pressed.

Question 2

Create a task Button_Monitor in the Solar_System.Button child package.

This task will have to reverse the direction of the objects when the button is pressed.

This task will have to wait on a Button.Wait_Press protected entry that will be accessible when a button press has been detected by the button’s interrupt handler.