#ifndef _sw_ #define _sw_ #include "config.h" extern u8 SW_pow_count; extern bit SW_pow_mask; #define INTERVAL_TSK_SW 8 #define CLICK_THRESHOLD 2 #ifdef _FORCE_OFF_1SEC_ #define HOLD_THREASHOLD (u8)( 800 / INTERVAL_TSK_SW ) #define FORCEOFF_THREASHOLD (u8)( 1200 / INTERVAL_TSK_SW /10 ) #else #define HOLD_THREASHOLD (u8)( 2000 / INTERVAL_TSK_SW ) #define FORCEOFF_THREASHOLD (u8)( 4000 / INTERVAL_TSK_SW /10 ) #endif #endif