From 10e2a9b12c8e1ef689f5a04037033f58aeab0cfd Mon Sep 17 00:00:00 2001 From: fujita_ryohei Date: Fri, 13 Nov 2009 07:42:57 +0000 Subject: [PATCH] =?UTF-8?q?=E6=AD=A9=E6=95=B0=E8=A8=88=E3=82=92=E5=90=84?= =?UTF-8?q?=E3=83=AC=E3=82=B3=E3=83=BC=E3=83=89=202=E3=83=90=E3=82=A4?= =?UTF-8?q?=E3=83=88=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@26 013db118-44a6-b54f-8bf7-843cb86687b1 --- trunk/accero.c | 2 +- trunk/vreg_ctr.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/trunk/accero.c b/trunk/accero.c index 3df4df9..3d921a1 100644 --- a/trunk/accero.c +++ b/trunk/accero.c @@ -49,7 +49,7 @@ #define VREG_BITMASK_ACC_CONF_ACQ ( 1 << 0 ) // ======================================================== -static u8 hyst_pedometer[256]; +static u16 hyst_pedometer[256]; // ======================================================== diff --git a/trunk/vreg_ctr.c b/trunk/vreg_ctr.c index 4a97cba..ee473ad 100644 --- a/trunk/vreg_ctr.c +++ b/trunk/vreg_ctr.c @@ -233,7 +233,16 @@ u8 vreg_ctr_read( u8 adrs ) { return( vreg_ctr[ VREG_C_MCU_STATUS ] | ( ( vreg_twl[ REG_TWL_INT_ADRS_MODE ] & 0x03 ) << 6 ) ); } - return ( vreg_ctr[adrs] ); +#ifdef _debug_ + if( adrs >= VREG_C_ENDMARK_ ) + { + return( 0xEE ); + } + else +#endif + { + return ( vreg_ctr[adrs] ); + } }