ctr_mcu/snake_trunk/sw.h

21 lines
481 B
C

#ifndef _sw_
#define _sw_
#include "config.h"
extern u16 SW_pow_count;
extern bit SW_pow_mask;
#define INTERVAL_TSK_SW 8
#define CLICK_THRESHOLD 5
#define HOLD_THREASHOLD (u16)( 3000 /INTERVAL_TSK_SW )
#define TIME_PWSW_CLICK (u8)( 220 /INTERVAL_TSK_SW )
#define FORCEOFF_THREASHOLD (u8)( 12000 /INTERVAL_TSK_SW /16 )
extern u16 off_timeout_timer;
#define clear_pow_off_countdown(){ off_timeout_timer = 0; force_off = false; }
#endif