mirror of
https://github.com/rvtr/ctr_mcu.git
synced 2025-10-31 13:51:10 -04:00
swの時間カウントが誤っていたのを修正
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@250 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
parent
dbfa16838c
commit
8b43c444af
1501
trunk/bsr.hex
1501
trunk/bsr.hex
File diff suppressed because it is too large
Load Diff
BIN
trunk/hoge.bin
BIN
trunk/hoge.bin
Binary file not shown.
@ -44,7 +44,7 @@ bit SW_HOME_n;
|
||||
counter = 0; \
|
||||
}else{ \
|
||||
counter += 1; \
|
||||
if( counter == 0 ) counter = 255; \
|
||||
if( counter == 0 ) counter = -1; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
@ -98,15 +98,15 @@ void tsk_sw( )
|
||||
case ( BT_CHARGE ):
|
||||
case ( OFF ):
|
||||
// “dŒ¹ƒXƒCƒbƒ`‚ÌŠÄŽ‹ //
|
||||
if( SW_pow_count == (u8)(160/(INTERVAL_TSK_SW / SYS_INTERVAL_TICK)) )
|
||||
if( SW_pow_count == (u8)( 320/ INTERVAL_TSK_SW ) )
|
||||
{
|
||||
set_irq( VREG_C_IRQ0, REG_BIT_SW_POW_CLICK );
|
||||
}
|
||||
else if( SW_pow_count == (u8)( HOLD_THREASHOLD * 1.5 ) )
|
||||
else if( SW_pow_count == ( HOLD_THREASHOLD ) )
|
||||
{
|
||||
set_irq( VREG_C_IRQ0, REG_BIT_SW_POW_HOLD );
|
||||
}
|
||||
else if( SW_pow_count > ( (u16)HOLD_THREASHOLD + vreg_ctr[ VREG_C_OFF_DELAY ] *9 ))
|
||||
else if( SW_pow_count > ( HOLD_THREASHOLD + vreg_ctr[ VREG_C_OFF_DELAY ] *16 )) // ‚¨‚æ‚» 100/SYSTEM_TICK
|
||||
{
|
||||
system_status.force_off = 1;
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ extern bit SW_pow_mask;
|
||||
#define INTERVAL_TSK_SW 8
|
||||
#define CLICK_THRESHOLD 2
|
||||
|
||||
#define HOLD_THREASHOLD (u8)( 2000 /INTERVAL_TSK_SW /SYS_INTERVAL_TICK )
|
||||
#define FORCEOFF_THREASHOLD 50
|
||||
#define HOLD_THREASHOLD (u8)( 2000 /INTERVAL_TSK_SW )
|
||||
#define FORCEOFF_THREASHOLD 32
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user