mirror of
https://github.com/rvtr/ctr_mcu.git
synced 2025-10-31 13:51:10 -04:00
歩数計ログクリアのレジスタ、任意の書き込みでログをクリアしていた。
ちゃんとビットを確認するようにした。 git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@84 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
parent
6cd9cf5bf1
commit
f0291ac8f6
@ -2,7 +2,7 @@
|
||||
#define __config__
|
||||
|
||||
#define _debug_
|
||||
#define _debug_led_
|
||||
// #define _debug_led_
|
||||
|
||||
|
||||
#define MCU_VER_MAJOR 0x00
|
||||
|
||||
@ -110,7 +110,9 @@ __interrupt void int_iic_ctr( )
|
||||
|
||||
if( STD ) // 割り込み要因:スタートコンディション
|
||||
{
|
||||
if( ( state == IIC_TX ) || ( state == IIC_RX ) )
|
||||
if( ( state == IIC_TX ) || ( state == IIC_RX )
|
||||
|| ( state == IIC_RCV_REG_ADRS )
|
||||
)
|
||||
{
|
||||
state = IIC_IDLE;
|
||||
// no break //
|
||||
|
||||
@ -78,7 +78,7 @@ void tsk_misc_stat( )
|
||||
}
|
||||
|
||||
|
||||
//#ifdef _MCU_KE3_
|
||||
#ifdef _MCU_KE3_
|
||||
// KE3では必須です。
|
||||
/* ========================================================
|
||||
加速度センサ割り込みピンがオリジナルマイコンには無いので
|
||||
@ -91,11 +91,12 @@ void tsk_misc_stat( )
|
||||
{
|
||||
if( ACC_VALID )
|
||||
{
|
||||
renge_task_immed_add( tsk_cbk_accero );
|
||||
NOP();
|
||||
if( renge_task_immed_add( tsk_cbk_accero ) == ERR_SUCCESS ){
|
||||
NOP();
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
// 割り込みの取りこぼし?
|
||||
if( !PM_IRQ_n ){
|
||||
|
||||
@ -238,10 +238,13 @@ void vreg_ctr_write( u8 adrs, u8 data )
|
||||
break;
|
||||
|
||||
case ( VREG_C_ACC_HOSU_SETTING ):
|
||||
fill_hosu_hist_hours( 0 ); // 履歴クリア
|
||||
vreg_ctr[ VREG_C_ACC_HOSU_L ] = 0;
|
||||
vreg_ctr[ VREG_C_ACC_HOSU_M ] = 0;
|
||||
vreg_ctr[ VREG_C_ACC_HOSU_H ] = 0;
|
||||
if( ( data & 0x01 ) != 0 )
|
||||
{
|
||||
fill_hosu_hist_hours( 0 ); // 履歴クリア
|
||||
vreg_ctr[ VREG_C_ACC_HOSU_L ] = 0;
|
||||
vreg_ctr[ VREG_C_ACC_HOSU_M ] = 0;
|
||||
vreg_ctr[ VREG_C_ACC_HOSU_H ] = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ( VREG_C_COMMAND3 ):
|
||||
|
||||
@ -3,10 +3,6 @@ C:\WINDOWS\system32\cmd.exe /c touch magic.c
|
||||
Compilation complete, 0 error(s) and 0 warning(s) found.
|
||||
"C:\Program Files\NEC Electronics Tools\RA78K0R\W1.31\bin\ra78k0r.exe" -c9F0104 -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff inter_asm\magic.asm
|
||||
Assembly complete, 0 error(s) and 0 warning(s) found.
|
||||
"C:\Program Files\NEC Electronics Tools\CC78K0R\W2.10\bin\cc78k0r.exe" -c9F0104 -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff -irenge -i"C:\Program Files\NEC Electronics Tools\FSL78K0R_Type02ES\V1.20\inc78k0r" -ms -quvjl3wt -sainter_asm -zp -no renge\renge.c
|
||||
Compilation complete, 0 error(s) and 0 warning(s) found.
|
||||
"C:\Program Files\NEC Electronics Tools\RA78K0R\W1.31\bin\ra78k0r.exe" -c9F0104 -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff inter_asm\renge.asm
|
||||
Assembly complete, 0 error(s) and 0 warning(s) found.
|
||||
"C:\Program Files\NEC Electronics Tools\RA78K0R\W1.31\bin\lk78k0r.exe" -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff -obsr.lmf "..\..\Program Files\NEC Electronics Tools\CC78K0R\W2.10\lib78k0r\s0rm.rel" -go85h,0FC00h,1024 -gi0FFFFFFFFFFFFFFFFFFFFh -pbsr_k0r.map -nkd -kp -gb6EFBFFh -b"C:\Program Files\NEC Electronics Tools\FSL78K0R_Type02ES\V1.20\lib78k0r\fsl.lib" -bcl0rdm.lib -bcl0rm.lib -bcl0rmf.lib -i"C:\Program Files\NEC Electronics Tools\CC78K0R\W2.10\lib78k0r" -dbsr_mcu.dr -s -w0 loader.rel pm.rel i2c_ctr.rel main.rel magic.rel WDT.rel i2c_mcu.rel i2c_twl.rel ini_VECT.rel led.rel rtc.rel vreg_ctr.rel vreg_twl.rel adc.rel renge.rel accero.rel self_flash.rel reboot.rel sw.rel task_debug.rel task_misc.rel task_sys.rel
|
||||
Link complete, 0 error(s) and 0 warning(s) found.
|
||||
"C:\Program Files\NEC Electronics Tools\RA78K0R\W1.31\bin\oc78k0r.exe" -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff -o.\bsr.hex -nu -ki bsr.lmf
|
||||
|
||||
@ -22,7 +22,7 @@ SubClock=None
|
||||
[Mapping]
|
||||
Count=0
|
||||
[Main]
|
||||
Geometry=25, 22, 1467, 1110
|
||||
Geometry=115, 23, 1467, 1110
|
||||
Window=Normal
|
||||
MDI_MAX=OFF
|
||||
Button=ON
|
||||
@ -78,7 +78,7 @@ Symbol Type=OFF
|
||||
Language=C
|
||||
Kanji=SJIS
|
||||
[Source]
|
||||
Geometry=274, 329, 1012, 623
|
||||
Geometry=173, 154, 1012, 920
|
||||
Window=Normal
|
||||
DispStart=209
|
||||
CaretPos=210,0
|
||||
@ -139,19 +139,11 @@ SaveRange=Screen
|
||||
SaveStart=
|
||||
SaveEnd=
|
||||
Accumulative=ON
|
||||
[Source1]
|
||||
Geometry=50, 50, 1019, 857
|
||||
Window=Normal
|
||||
DispStart=37
|
||||
CaretPos=53,11
|
||||
Mode=Normal
|
||||
DispFile=accero.c
|
||||
Accumulative=ON
|
||||
[Assemble]
|
||||
Geometry=605, 2, 600, 400
|
||||
Window=Normal
|
||||
DispStart=14015
|
||||
CaretPos=14015,27
|
||||
DispStart=14008
|
||||
CaretPos=14008,27
|
||||
Address1=
|
||||
Address2=
|
||||
Address3=
|
||||
@ -866,71 +858,61 @@ Count=0
|
||||
Geometry=1225, 6, 354, 910
|
||||
Window=Normal
|
||||
Boundary=13762700
|
||||
0=+pool,P,N,A,-,1
|
||||
1=.new_task,.,N,A,+,1
|
||||
2=.vreg_ctr,P,N,A,+,1
|
||||
3=.cmd_BL,P,N,A,+,1
|
||||
4=.P7,B,S,A,+,1
|
||||
5=.p5,B,S,A,+,1
|
||||
Line=6
|
||||
0=.new_task,.,N,A,+,1
|
||||
1=.if2h,P,S,A,+,1
|
||||
2=.pool,P,N,A,+,1
|
||||
3=.new_task,.,N,A,+,1
|
||||
4=.vreg_ctr,P,N,A,+,1
|
||||
5=.cmd_BL,P,N,A,+,1
|
||||
6=.P7,B,S,A,+,1
|
||||
7=.p5,B,S,A,+,1
|
||||
Line=8
|
||||
[Quick Watch]
|
||||
0=rtciimk,P,A,1
|
||||
1=wdte,P,A,1
|
||||
2=SEC,P,A,1
|
||||
3=rtcif,P,A,1
|
||||
4=vreg_twl,P,A,1
|
||||
5=pm0,P,A,1
|
||||
6=data,P,A,1
|
||||
7=P5.3,P,A,1
|
||||
8=p4.3,P,A,1
|
||||
9=pu0,P,A,1
|
||||
10=p5,B,A,1
|
||||
11=P7,B,A,1
|
||||
12=cmd_BL,P,A,1
|
||||
13=vreg_ctr,P,A,1
|
||||
14=new_task,P,A,1
|
||||
15=pool,P,A,1
|
||||
0=SEC,P,A,1
|
||||
1=rtcif,P,A,1
|
||||
2=vreg_twl,P,A,1
|
||||
3=pm0,P,A,1
|
||||
4=data,P,A,1
|
||||
5=P5.3,P,A,1
|
||||
6=p4.3,P,A,1
|
||||
7=pu0,P,A,1
|
||||
8=p5,B,A,1
|
||||
9=P7,B,A,1
|
||||
10=cmd_BL,P,A,1
|
||||
11=vreg_ctr,P,A,1
|
||||
12=pool,P,A,1
|
||||
13=if2,P,A,1
|
||||
14=if2h,P,A,1
|
||||
15=new_task,P,A,1
|
||||
[Software Break]
|
||||
Geometry=1204, 674, 500, 428
|
||||
Window=Normal
|
||||
Width=150 30 200 100
|
||||
Name0=Swb00003
|
||||
Address0=renge.c#_renge_task_immed_add+0x3a
|
||||
Name0=Swb00001
|
||||
Address0=self_flash.c#_firm_duplicate+0x72
|
||||
Window0=ASM
|
||||
Status0=ON
|
||||
Name1=Swb00001
|
||||
Address1=self_flash.c#_firm_duplicate+0x72
|
||||
Name1=Swb00002
|
||||
Address1=self_flash.c#_firm_duplicate+0x87
|
||||
Window1=ASM
|
||||
Status1=ON
|
||||
Name2=Swb00002
|
||||
Address2=self_flash.c#_firm_duplicate+0x87
|
||||
Name2=Swb00005
|
||||
Address2=self_flash.c#_firm_duplicate+0x82
|
||||
Window2=ASM
|
||||
Status2=ON
|
||||
Name3=Swb00005
|
||||
Address3=self_flash.c#_firm_duplicate+0x82
|
||||
Name3=Swb00006
|
||||
Address3=self_flash.c#_firm_duplicate+0x0
|
||||
Window3=ASM
|
||||
Status3=ON
|
||||
Name4=Swb00006
|
||||
Address4=self_flash.c#_firm_duplicate+0x0
|
||||
Name4=Swb00010
|
||||
Address4=renge.c#_renge_task_immed_run+0xe3
|
||||
Window4=ASM
|
||||
Status4=ON
|
||||
Name5=Swb00010
|
||||
Address5=renge.c#_renge_task_immed_run+0xe6
|
||||
Name5=Swb00003
|
||||
Address5=task_misc.c#_do_command0+0x10
|
||||
Window5=ASM
|
||||
Status5=ON
|
||||
Name6=Swb00004
|
||||
Address6=renge.c#_renge_task_immed_run+0x4c
|
||||
Window6=ASM
|
||||
Status6=ON
|
||||
Name7=Swb00007
|
||||
Address7=renge.c#_renge_task_immed_run+0xba
|
||||
Window7=ASM
|
||||
Status7=ON
|
||||
Name8=Swb00008
|
||||
Address8=renge.c#_renge_task_immed_run+0x12e
|
||||
Window8=ASM
|
||||
Status8=ON
|
||||
Count=9
|
||||
Count=6
|
||||
[Reset]
|
||||
Debugger=ON
|
||||
Symbol=OFF
|
||||
|
||||
Loading…
Reference in New Issue
Block a user