mirror of
https://github.com/rvtr/ctr_mcu.git
synced 2025-10-31 13:51:10 -04:00
RBRの対応を暫定対策ごと削除。
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@460 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
parent
f77e630f7f
commit
43466f31cd
Binary file not shown.
Binary file not shown.
@ -287,7 +287,7 @@ static void hdwinit2( )
|
|||||||
// リセット後の初期値0が保証されているのは省略
|
// リセット後の初期値0が保証されているのは省略
|
||||||
// P0 = bits8(0,0,0,0, 0,0,0,0); // -,-,-,-, -,-,/reset2,/reset1
|
// P0 = bits8(0,0,0,0, 0,0,0,0); // -,-,-,-, -,-,/reset2,/reset1
|
||||||
// P1 = bits8(0,0,0,0, 0,0,0,0); // bt_temp_p,bt_det_p,led_info_r,led_pow_b led_info_g,32khz_o,led_wifi,led_info_b
|
// P1 = bits8(0,0,0,0, 0,0,0,0); // bt_temp_p,bt_det_p,led_info_r,led_pow_b led_info_g,32khz_o,led_wifi,led_info_b
|
||||||
// P2 = bits8(0,0,0,0, 0,0,0,0); // ad_vol,ad_3d,acc_int1,led_chg, (sw_sel),(rbr_flight),(/rbr_rst),(ext_vdd33)
|
// P2 = bits8(0,0,0,0, 0,0,0,0); // ad_vol,ad_3d,acc_int1,led_chg, (sw_sel),(-),(-),(ext_vdd33)
|
||||||
P3 = bits8(0,0,0,0, 1,1,1,0); // -,-,-,-, i2c_pu,scl_m,sda_m,/fcr_rst // 簡易I2Cは出力ラッチを1にする
|
P3 = bits8(0,0,0,0, 1,1,1,0); // -,-,-,-, i2c_pu,scl_m,sda_m,/fcr_rst // 簡易I2Cは出力ラッチを1にする
|
||||||
// P6 = bits8(0,0,0,0, 0,0,0,0); // -,-,-,-, -,-,sda2,scl2
|
// P6 = bits8(0,0,0,0, 0,0,0,0); // -,-,-,-, -,-,sda2,scl2
|
||||||
// P7 = bits8(0,0,0,0, 0,0,0,0); // slp_o,/irq,led_cam,sw_wifi, sw_pow,pm_irw,shell_close,/extdc
|
// P7 = bits8(0,0,0,0, 0,0,0,0); // slp_o,/irq,led_cam,sw_wifi, sw_pow,pm_irw,shell_close,/extdc
|
||||||
|
|||||||
@ -385,12 +385,10 @@ u8 extinfo_read(void)
|
|||||||
infos_temp[3] = 1; /* 仕様変更により1固定になった */
|
infos_temp[3] = 1; /* 仕様変更により1固定になった */
|
||||||
infos_temp[4] = 0
|
infos_temp[4] = 0
|
||||||
// | ( PM_EXTDC_n ? REG_BIT_HAL0_PM_EXTDC_n : 0 ) // status0にある
|
// | ( PM_EXTDC_n ? REG_BIT_HAL0_PM_EXTDC_n : 0 ) // status0にある
|
||||||
| ( RBR_RESET_n ? REG_BIT_HAL0_PM_EXTDC_n : 0 ) // ↑空きを使わせてもらう
|
|
||||||
| ( BT_IN_CHG_n ? REG_BIT_HAL0_BT_IN_CHG_n : 0 )
|
| ( BT_IN_CHG_n ? REG_BIT_HAL0_BT_IN_CHG_n : 0 )
|
||||||
| ( BT_CHG_Ena_n ? REG_BIT_HAL0_RSV_5 : 0 ) // 空きビット使用,out pin
|
| ( BT_CHG_Ena_n ? REG_BIT_HAL0_RSV_5 : 0 ) // 空きビット使用,out pin
|
||||||
| 0 // WL_TX 使えない
|
| 0 // WL_TX 使えない
|
||||||
// | ( SHELL_OPEN ? REG_BIT_HAL0_SHELL_OPEN : 0 ) // status0にある
|
// | ( SHELL_OPEN ? REG_BIT_HAL0_SHELL_OPEN : 0 ) // status0にある
|
||||||
| ( RBR_FLIGHT ? REG_BIT_HAL0_SHELL_OPEN : 0 ) // ↑空きを使わせてもらう
|
|
||||||
| ( SW_WIFI_n ? REG_BIT_HAL0_SW_WIFI_n : 0 )
|
| ( SW_WIFI_n ? REG_BIT_HAL0_SW_WIFI_n : 0 )
|
||||||
| ( SW_HOME_n ? REG_BIT_HAL0_SW_HOME_n : 0 )
|
| ( SW_HOME_n ? REG_BIT_HAL0_SW_HOME_n : 0 )
|
||||||
| ( SW_POW_n ? REG_BIT_HAL0_SW_POW_n : 0 );
|
| ( SW_POW_n ? REG_BIT_HAL0_SW_POW_n : 0 );
|
||||||
|
|||||||
@ -221,10 +221,6 @@ void tsk_sys( )
|
|||||||
// PMK21 = 0; // wifi 使わない
|
// PMK21 = 0; // wifi 使わない
|
||||||
PMK6 = 0; // pm_irq
|
PMK6 = 0; // pm_irq
|
||||||
|
|
||||||
// todo 将来的には完全にレジスタ制御に
|
|
||||||
RBR_RESET_n = 1;
|
|
||||||
RBR_FLIGHT = 0;
|
|
||||||
|
|
||||||
// リブート時、ステータスを何となく更新
|
// リブート時、ステータスを何となく更新
|
||||||
if( system_status.reboot )
|
if( system_status.reboot )
|
||||||
{
|
{
|
||||||
@ -345,10 +341,6 @@ void tsk_sys( )
|
|||||||
IIC_twl_Stop( );
|
IIC_twl_Stop( );
|
||||||
RTC_32k_off();
|
RTC_32k_off();
|
||||||
|
|
||||||
// todo マクロにでもする
|
|
||||||
RBR_RESET_n = 0;
|
|
||||||
RBR_FLIGHT = 0;
|
|
||||||
|
|
||||||
// 電源オン条件の割り込みセット
|
// 電源オン条件の割り込みセット
|
||||||
// PWSW KR3 押すとL
|
// PWSW KR3 押すとL
|
||||||
// BG24 KR4
|
// BG24 KR4
|
||||||
|
|||||||
@ -125,9 +125,8 @@
|
|||||||
#define WL_TX P20.3 // INTP21 // F3
|
#define WL_TX P20.3 // INTP21 // F3
|
||||||
#define PM_WL_TX PM20.3 // INTP21
|
#define PM_WL_TX PM20.3 // INTP21
|
||||||
|
|
||||||
// RBR<42>§Œä
|
//#define VOL_P P2.1 // E5 Œ»<C592>óopen
|
||||||
#define RBR_RESET_n P2.1 // E5
|
//#define VOL_N P2.2 // F5 <20>V
|
||||||
#define RBR_FLIGHT P2.2 // F5
|
|
||||||
|
|
||||||
//#define LED_CAM P1.0 // TO02 // E4
|
//#define LED_CAM P1.0 // TO02 // E4
|
||||||
//#define LED_WIFI P1.1 // TO03 // E3
|
//#define LED_WIFI P1.1 // TO03 // E3
|
||||||
|
|||||||
@ -68,8 +68,6 @@ void vreg_ctr_init( )
|
|||||||
|
|
||||||
vreg_ctr[ VREG_C_VOL_CAL_MIN ] = 0x36;
|
vreg_ctr[ VREG_C_VOL_CAL_MIN ] = 0x36;
|
||||||
vreg_ctr[ VREG_C_VOL_CAL_MAX ] = 0xFF - 0x36;
|
vreg_ctr[ VREG_C_VOL_CAL_MAX ] = 0xFF - 0x36;
|
||||||
|
|
||||||
vreg_ctr[ VREG_C_RBR_CONTROL ] = REG_BIT_RESET_n; // todo | REG_BIT_FLIGHT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -317,26 +315,6 @@ void vreg_ctr_write( u8 adrs, u8 data )
|
|||||||
vreg_free_adrs = data;
|
vreg_free_adrs = data;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ( VREG_C_RBR_CONTROL ):
|
|
||||||
if(( data & REG_BIT_RESET_n ) != 0 )
|
|
||||||
{
|
|
||||||
RBR_RESET_n = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
RBR_RESET_n = 0;
|
|
||||||
}
|
|
||||||
if(( data & REG_BIT_FLIGHT ) != 0 )
|
|
||||||
{
|
|
||||||
RBR_FLIGHT = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
RBR_FLIGHT = 0;
|
|
||||||
}
|
|
||||||
vreg_ctr[ VREG_C_RBR_CONTROL ] = data;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ( VREG_C_COMMAND3 ):
|
case ( VREG_C_COMMAND3 ):
|
||||||
switch ( data )
|
switch ( data )
|
||||||
{
|
{
|
||||||
@ -369,6 +347,11 @@ void vreg_ctr_write( u8 adrs, u8 data )
|
|||||||
// vreg_ctr[ VREG_C_COMMAND3 ] = data; // 書く必要なし
|
// vreg_ctr[ VREG_C_COMMAND3 ] = data; // 書く必要なし
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ( VREG_C_RBR_CONTROL ):
|
||||||
|
vreg_ctr[ VREG_C_RBR_CONTROL ] = data; // todo debug ブレークポイントを置くため。現状、フリーレジスタ
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
// read only //////////////////////////////////////////
|
// read only //////////////////////////////////////////
|
||||||
case VREG_C_MCU_VER_MAJOR:
|
case VREG_C_MCU_VER_MAJOR:
|
||||||
case VREG_C_MCU_VER_MINOR:
|
case VREG_C_MCU_VER_MINOR:
|
||||||
|
|||||||
@ -223,7 +223,7 @@ enum VREG_C_ADRS
|
|||||||
VREG_C_LED_NOTIFY_DATA,
|
VREG_C_LED_NOTIFY_DATA,
|
||||||
VREG_C_LED_NOTIFY_FLAG,
|
VREG_C_LED_NOTIFY_FLAG,
|
||||||
|
|
||||||
VREG_C_RBR_CONTROL = 0x2F,
|
VREG_C_RBR_CONTROL = 0x2F, // ”pŽ~
|
||||||
|
|
||||||
VREG_C_RTC_SEC = 0x30,
|
VREG_C_RTC_SEC = 0x30,
|
||||||
VREG_C_RTC_MIN,
|
VREG_C_RTC_MIN,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user