リードオンリーのレジスタにかけてしまっていたのを修正

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@180 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
N2232 2010-05-27 01:47:10 +00:00
parent 9bf41da1b2
commit 2bcb8aae68

View File

@ -88,7 +88,7 @@ void vreg_ctr_write( u8 adrs, u8 data )
{
case ( VREG_C_MCU_STATUS ):
vreg_twl[ REG_TWL_INT_ADRS_MODE ] = (u8)( ( data >> 6 ) & 0x03 );
// vreg_twl[ REG_TWL_INT_ADRS_MODE ] = (u8)( ( data >> 6 ) & 0x03 );
vreg_ctr[ VREG_C_MCU_STATUS ] = data;
break;
@ -304,6 +304,29 @@ void vreg_ctr_write( u8 adrs, u8 data )
}
vreg_ctr[ VREG_C_COMMAND3 ] = data;
break;
// read only
case ( VREG_C_MCU_VER_MAJOR ):
case ( VREG_C_MCU_VER_MINOR ):
// VREG_C_TUNE = 0x08,
// VREG_C_SND_VOL,
// VREG_C_BT_TEMP,
// VREG_C_BT_REMAIN,
// VREG_C_BT_REMAIN_FINE,
// VREG_C_BT_VOLTAGE,
case ( VREG_C_STATUS_1 ):
case ( VREG_C_STATUS ):
case ( VREG_C_IRQ0 ):
case ( VREG_C_IRQ1 ):
case ( VREG_C_IRQ2 ):
case ( VREG_C_IRQ3 ):
case ( VREG_C_IRQ4 ):
case ( VREG_C_LED_NOTIFY_FLAG ):
case ( VREG_C_RTC_SEC_FINE_L ):
case ( VREG_C_RTC_SEC_FINE_H ):
// VREG_C_ACC_RESERVE,
// VREG_C_ACC_HOSU_HIST = 0x4F,
break;
default:
/*
@ -357,7 +380,7 @@ u8 vreg_ctr_read( u8 adrs )
}
else if( adrs == VREG_C_MCU_STATUS )
{
return( vreg_ctr[ VREG_C_MCU_STATUS ] |
return( ( vreg_ctr[ VREG_C_MCU_STATUS ] & 0x03 ) |
( ( vreg_twl[ REG_TWL_INT_ADRS_MODE ] & 0x03 ) << 6 ) | // sys_mode
( ( vreg_twl[ REG_TWL_INT_ADRS_MODE ] & 0x80 ) >> 2 )); // vol32
}