・残量の少ない電池を入れたとき、お知らせLED赤が一瞬点く問題、対応が完全でなかった。

根本対策...を行った
・互換でのカメラLEDがTWLと異なる動作をする。NUP1に入れたい(村上さん)とのことなので対応。チェックはこれから。パワプロクン12のみ確認。

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@322 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
n2232 2011-02-18 11:19:15 +00:00
parent 1ae045df55
commit c71b6c1b0a
6 changed files with 53 additions and 59 deletions

Binary file not shown.

View File

@ -53,6 +53,9 @@ static u8 led_pow_batt_low();
// 赤LEDの電池残量LEDの点滅パターン
st_led_red_batt_empty led_red_batt_empty = { 0x55, 0x55, 0x55, 0x55 };
bit initialized;
// お知らせLEDのパターンデータ
uni_info_LED info_LED;
@ -200,6 +203,7 @@ void LED_init( )
LED_duty_pow_blu = LED_BRIGHT_MAX;
}
info_led_off = false;
initialized = true;
}
@ -212,6 +216,7 @@ void LED_stop( )
LED_pow_red = 0;
LED_CAM = 0;
LED_old_pow_red = 0;
initialized = false;
}
@ -241,6 +246,12 @@ enum LED_ILUM_MODE{
======================================================== */
void tsk_led_pow( )
{
if( ! initialized )
{
return;
// おしまい
}
info_led_override = false;
switch ( vreg_ctr[VREG_C_LED_POW] )
@ -654,7 +665,7 @@ void tsk_led_notify( )
void tsk_led_cam( )
{
static u8 state_led_cam = 0;
static u8 task_interval;
static u16 task_interval;
u8 LED_CAM_mirror;
DI(); // レジスタへの書き込みで強制起動がかかることがあるため
@ -732,7 +743,8 @@ void tsk_led_cam( )
break;
case( CAM_LED_BY_TWL ):
switch ( vreg_twl[ REG_TWL_INT_ADRS_CAM ] ){ // switchのネストとか…
// TWL互換 //
switch ( vreg_twl[ REG_TWL_INT_ADRS_CAM ] ){ //. switchのネストとか…
case( TWL_CAMLED_OFF ):
LED_CAM_mirror = 0;
state_led_cam = 0;
@ -749,7 +761,7 @@ void tsk_led_cam( )
LED_CAM_mirror = 0;
state_led_cam = 0;
}
task_interval = 250;
task_interval = 600 / SYS_INTERVAL_TICK + 250;
break;
case( TWL_CAMLED_ON ):

View File

@ -61,7 +61,7 @@ void vreg_twl_write( u8 adrs, u8 data )
{
cam_led_update = true; // こうでないと一発消灯時に不具合があるため
}
tsk_led_cam();
tsk_led_cam();
break;
case ( REG_TWL_INT_ADRS_TEMP0 ):

View File

@ -12,7 +12,7 @@ Firm Clock=System
Flash Programming=Permit
Low-voltage Flash Rewriting=On
Fail Safe Break=0x2000
Port=1
Port=0
NMI=OFF
TRESET=OFF
IRESET=OFF
@ -22,7 +22,7 @@ SubClock=None
[Mapping]
Count=0
[Main]
Geometry=110, 110, 1200, 858
Geometry=66, 66, 960, 728
Window=Max
MDI_MAX=OFF
Button=ON
@ -58,7 +58,7 @@ Symbol Reset1=ON
Dir=\\tsclient\C\78k_data\yav-mcu-basara\trunk\
Filter=Source
[Debugger Option]
Source Path=""
Source Path="\\tsclient\C\78k_data\yav-mcu-basara\trunk\renge"
Symbol Size=Byte
Symbol Format=Hex
Register Name=Func
@ -78,10 +78,10 @@ Symbol Type=OFF
Language=C
Kanji=SJIS
[Source]
Geometry=212, 6, 902, 1043
Geometry=278, 33, 715, 1006
Window=Normal
DispStart=11
CaretPos=81,0
DispStart=431
CaretPos=432,0
Mode=Normal
DispFile=
Address1=
@ -139,19 +139,11 @@ SaveRange=Screen
SaveStart=
SaveEnd=
Accumulative=ON
[Source1]
Geometry=32, 50, 771, 1011
Window=Normal
DispStart=453
CaretPos=506,17
Mode=Normal
DispFile=\\tsclient\C\78k_data\yav-mcu-basara\trunk\pedo_alg_thre_det2.c
Accumulative=ON
[Assemble]
Geometry=574, 49, 600, 400
Window=Normal
DispStart=802
CaretPos=802,27
Geometry=0, 0, 0, 0
Window=Hide
DispStart=847434752
CaretPos=0,0
Address1=
Address2=
Address3=
@ -259,9 +251,9 @@ Destination=0
[I/O Port]
Line=0
[Stack]
Geometry=1141, 319, 400, 300
Window=Normal
Boundary=13762687
Geometry=0, 0, 0, 0
Window=Hide
Boundary=0
Mode=Proper
[Sfr]
Geometry=0, 0, 0, 0
@ -822,9 +814,9 @@ L529=IICWL1
L530=IICWH1
L531=SVA1
[Local Variable]
Geometry=1150, 803, 400, 300
Window=Normal
Boundary=13041851
Geometry=0, 0, 0, 0
Window=Hide
Boundary=0
Mode=Proper
[Trace View]
Geometry=0, 0, 0, 0
@ -965,20 +957,20 @@ Detail=OFF
Last Name=
Count=0
[Variable]
Geometry=1110, 10, 440, 300
Geometry=945, 6, 644, 1042
Window=Normal
Boundary=13762700
0=+cal_log_latest,.,N,A,-,1
1=.last_hour_fny,D,N,A,+,1
2=.now_longhour,D,N,A,+,1
0=.vreg_ctr,P,N,A,+,1
1=.tdr05,P,S,A,+,1
2=.system_status,.,N,A,+,1
Line=3
[Quick Watch]
0=cal_buff,P,A,1
1=rv,P,A,1
2=iic_burst_state,P,A,1
3=now_longhour,P,A,1
4=last_hour_fny,P,A,1
5=cal_log_latest,P,A,1
0=tdr05,P,A,1
1=vreg_ctr,P,A,1
2=system_status,P,A,1
3=
4=
5=
6=
7=
8=
@ -994,18 +986,14 @@ Geometry=0, 0, 0, 0
Window=Hide
Width=150 30 200 100
Name0=Swb00003
Address0=pedo_alg_thre_det2.c#_get_long_hour+0x7b
Address0=led.c#_led_pow_bt_empty+0x0
Window0=ASM
Status0=ON
Name1=Swb00001
Address1=pedo_alg_thre_det2.c#_hosu_increment_if_necessary+0x55
Address1=led.c#_tsk_led_pow+0x7e
Window1=ASM
Status1=ON
Name2=Swb00002
Address2=pedo_alg_thre_det2.c#_calc_hours_spend+0x28
Window2=ASM
Status2=ON
Count=3
Count=2
[Reset]
Debugger=ON
Symbol=OFF

View File

@ -23,7 +23,7 @@ MuitiLoad=0
LoadPrjNum=0
CheckVersion=CC78K0R|W2.13;RA78K0R|W1.33
[Option.IDK0R32G]
File=yav_mcu_bsr.pri
File=\\tsclient\C\78k_data\yav-mcu-basara\trunk\yav_mcu_bsr.pri
[BuildMode2]
BuildModeName=K0R_dbg
TargetFile=0
@ -840,7 +840,7 @@ G=1
E=0
E0=flash.elk
E1=a.elk
GO=0
GO=1
GOValue=85
GOStart=FC00
GOSizeValue=1024

View File

@ -1,7 +1,7 @@
[ProjectManager]
FrameMax=0
FrameX=447
FrameY=116
FrameX=307
FrameY=88
FrameCX=1435
FrameCY=1045
OpenFile1=jhl_defs.h,0,286,286,1530,1012,0,15,26,0
@ -9,17 +9,11 @@ OpenFile2=self_flash.c,0,352,352,1596,1078,0,142,5,0
OpenFile3=ini_VECT.c,0,330,330,1574,1056,6,93,6,0
OpenFile4=renge\renge.c,0,348,332,1592,1058,0,31,0,0
OpenFile5=renge\renge.h,0,264,264,1508,990,3,4,3,0
OpenFile6=adc.c,0,220,220,1464,946,8,230,8,0
OpenFile7=config.h,0,242,242,1486,968,0,40,0,0
OpenFile8=led.c,0,264,264,1508,990,0,731,0,0
OpenFile9=task_misc.c,0,286,286,1530,1012,65,141,69,0
OpenFile10=main.c,0,220,220,1464,946,3,27,1,0
OpenFile11=i2c_mcu.c,0,308,308,1552,1034,10,76,7,0
OpenFile12=ProjectWindow
OpenFile6=ProjectWindow
PrjPos=0,0,706,0,291
OpenFile13=OutputWindow
OutputPos=0,58,764,389,1336
OpenFile14=task_sys.c,0,465,262,1709,988,27,35,27,0
OpenFile7=pedo_alg_thre_det2.c,0,72,264,1187,865,0,398,0,0
OpenFile8=OutputWindow
OutputPos=0,34,740,376,1323
ActivePRJ=yav_mcu_bsr.prj
[ProjectWindow]
ProjectWindowDispType=0