gnatprove_13.2.1_28fc3583/share/examples/spark/heatingsystem/advancebutton-raw.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
with System.Storage_Elements;

-- Raw Advance Button Boundary Package
-- boundary package providing raw access to the advance switch
package body AdvanceButton.Raw
  with Refined_State => (Inputs => Input_Ext)
is
   Input_Ext : Boolean
     with Volatile,
          Async_Writers,
          Address => System.Storage_Elements.To_Address (16#FFFF_FFFF#);

   procedure Read (Pressed : out Boolean)
     with Refined_Global  => Input_Ext,
          Refined_Depends => (Pressed => Input_Ext)
   is
   begin
      Pressed  := Input_Ext;
   end Read;

end AdvanceButton.Raw;