small fix.

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@117 b871894f-2f95-9b40-918c-086798483c85
This commit is contained in:
nakasima 2008-12-17 10:42:06 +00:00
parent 83a1b88e57
commit e7502950c1
3 changed files with 19 additions and 20 deletions

View File

@ -16,7 +16,6 @@
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#include <brom/os.h> #include <brom/os.h>
void timer_handler(void);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#define REG_OS_TMCNT_H_E_MASK REG_OS_TM0CNT_H_E_MASK #define REG_OS_TMCNT_H_E_MASK REG_OS_TM0CNT_H_E_MASK
@ -49,7 +48,7 @@ void osInitTimer( void )
{ {
isInit = TRUE; isInit = TRUE;
i_osStopTimer64(); osStopTimer64();
} }
} }
@ -201,7 +200,7 @@ void osStartTimer64( u64 count, OSTimerPrescaler preScale )
// //
// stop a timer // stop a timer
// //
void i_osStopTimer( OSTimer id ) void osStopTimer( OSTimer id )
{ {
SDK_ASSERT(OS_TIMER_0 <= id && id <= OS_TIMER_3); SDK_ASSERT(OS_TIMER_0 <= id && id <= OS_TIMER_3);
//---- check if system reserved //---- check if system reserved
@ -213,15 +212,15 @@ void i_osStopTimer( OSTimer id )
// //
// stop 2 timers // stop 2 timers
// //
void i_osStopTimer32( OSTimer32 id ) void osStopTimer32( OSTimer32 id )
{ {
SDK_ASSERT(OS_TIMER32_01 <= id && id <= OS_TIMER32_23); SDK_ASSERT(OS_TIMER32_01 <= id && id <= OS_TIMER32_23);
//---- check if system reserved //---- check if system reserved
SDK_ASSERT(!i_osIsTimerReserved(id)); SDK_ASSERT(!i_osIsTimerReserved(id));
SDK_ASSERT(!i_osIsTimerReserved(id + 1)); SDK_ASSERT(!i_osIsTimerReserved(id + 1));
i_osStopTimer((OSTimer)((int)id + 1)); osStopTimer((OSTimer)((int)id + 1));
i_osStopTimer((OSTimer)id); osStopTimer((OSTimer)id);
} }
// //
@ -235,15 +234,15 @@ void i_osStopTimer48( OSTimer48 id )
SDK_ASSERT(!i_osIsTimerReserved(id + 1)); SDK_ASSERT(!i_osIsTimerReserved(id + 1));
SDK_ASSERT(!i_osIsTimerReserved(id + 2)); SDK_ASSERT(!i_osIsTimerReserved(id + 2));
i_osStopTimer((OSTimer)((int)id + 2)); osStopTimer((OSTimer)((int)id + 2));
i_osStopTimer((OSTimer)((int)id + 1)); osStopTimer((OSTimer)((int)id + 1));
i_osStopTimer((OSTimer)id); osStopTimer((OSTimer)id);
} }
// //
// stop all 4 timers // stop all 4 timers
// //
void i_osStopTimer64( void ) void osStopTimer64( void )
{ {
//---- check if system reserved //---- check if system reserved
SDK_ASSERT(!i_osIsTimerReserved(OS_TIMER_0)); SDK_ASSERT(!i_osIsTimerReserved(OS_TIMER_0));
@ -251,10 +250,10 @@ void i_osStopTimer64( void )
SDK_ASSERT(!i_osIsTimerReserved(OS_TIMER_2)); SDK_ASSERT(!i_osIsTimerReserved(OS_TIMER_2));
SDK_ASSERT(!i_osIsTimerReserved(OS_TIMER_3)); SDK_ASSERT(!i_osIsTimerReserved(OS_TIMER_3));
i_osStopTimer(OS_TIMER_3); osStopTimer(OS_TIMER_3);
i_osStopTimer(OS_TIMER_2); osStopTimer(OS_TIMER_2);
i_osStopTimer(OS_TIMER_1); osStopTimer(OS_TIMER_1);
i_osStopTimer(OS_TIMER_0); osStopTimer(OS_TIMER_0);
} }

View File

@ -145,7 +145,7 @@ void osStartTimer64( u64 count, OSTimerPrescaler preScale );
/*---------------------------------------------------------------------------* /*---------------------------------------------------------------------------*
Name: i_osStopTimer Name: osStopTimer
Description: stop timer(s) Description: stop timer(s)
@ -156,19 +156,19 @@ void osStartTimer64( u64 count, OSTimerPrescaler preScale );
// //
// stop a timer // stop a timer
// //
void i_osStopTimer( OSTimer id ); void osStopTimer( OSTimer id );
// //
// stop 2 timers // stop 2 timers
// //
void i_osStopTimer32( OSTimer32 id ); void osStopTimer32( OSTimer32 id );
// //
// stop 3 timers // stop 3 timers
// //
void i_osStopTimer48( OSTimer48 id ); void osStopTimer48( OSTimer48 id );
// //
// stop all 4 timers // stop all 4 timers
// //
void i_osStopTimer64( void ); void osStopTimer64( void );
#endif // SDK_ARM11 #endif // SDK_ARM11

View File

@ -39,7 +39,7 @@ typedef u32 OSTick32;
//---- tick APIs //---- tick APIs
extern void osInitTick( void ); extern void osInitTick( void );
extern u64 osGetTick( void ); extern u64 osGetTick( void );
extern void osSetTick( u64 ); extern void i_osSetTick( u64 );
//---- conversion tick count <-> real time count //---- conversion tick count <-> real time count