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] - Rev 30

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

package body TS1325.Button is
 
   function Is_Button_Pressed return Boolean is
      State: Byte;
   begin
      Inport (Button_Port, State);
      return (State and Button_Mask) /= Button_Mask;
   end Is_Button_Pressed;
 
   procedure Wait_For_Button_Press is
   begin
  Poll_Loop:
      loop
         if Is_Button_Pressed then
            delay Minimum_Press_Time;
            exit Poll_Loop when Is_Button_Pressed;
         end if;
         delay Poll_Interval;
      end loop Poll_Loop;
   end Wait_For_Button_Press;
 
end TS1325.Button;
 

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

powered by: WebSVN 2.1.0

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