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] ); + } }