Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1. #ifndef __ATX_H__
  2. #define __ATX_H__
  3.  
  4. /**
  5.  * @file
  6.  * @brief ATX power support.
  7.  * @author http://www.nedopc.com
  8.  *
  9.  * ATX power switching:
  10.  * - switch on ATX power on start by press "soft reset" button;
  11.  * - switch off ATX power by press "soft reset" button on 5 seconds.
  12.  */
  13.  
  14.  
  15. // constant for how long to hold soft reset or F12 to poweroff
  16. #define PWROFF_KEY_TIME (1000)
  17.  
  18. // soft reset debouncing constant (in 20ms increments)
  19. #define SOFT_RST_DEBOUNCE (2)
  20.  
  21. // ATX poweroff wait time (in 20ms increments)
  22. #define PWROFF_WAIT (100)
  23.  
  24. // pause before ATX poweron (in 20ms increments)
  25. #define PRE_PWRON_WAIT (100)
  26.  
  27.  
  28. /** Counter for atx power off delay. */
  29. extern volatile UWORD atx_counter;
  30.  
  31. /** Wait for press "soft reset" to ATX power on. */
  32. void wait_for_atx_power(void);
  33.  
  34. /**
  35.  * Check for atx power off switch.
  36.  */
  37. void atx_power_task(void);
  38.  
  39. #endif //__ATX_H__
  40.