OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i386/] [ts_386ex/] [tools/] [ts_1325_ada/] [ts1325-button.adb] - Blame information for rev 609

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
package body TS1325.Button is
2
 
3
   function Is_Button_Pressed return Boolean is
4
      State: Byte;
5
   begin
6
      Inport (Button_Port, State);
7
      return (State and Button_Mask) /= Button_Mask;
8
   end Is_Button_Pressed;
9
 
10
   procedure Wait_For_Button_Press is
11
   begin
12
  Poll_Loop:
13
      loop
14
         if Is_Button_Pressed then
15
            delay Minimum_Press_Time;
16
            exit Poll_Loop when Is_Button_Pressed;
17
         end if;
18
         delay Poll_Interval;
19
      end loop Poll_Loop;
20
   end Wait_For_Button_Press;
21
 
22
end TS1325.Button;

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.