22 #define TIMER_MULT_RATIO 110
23 #define TIMER_DIV_RATIO 200
28 u32 CurrentTimerDelay = 0;
29 void ( *CurrentEventTimer )( void ) = 0;
54 void Delayms( u32 nTime )
58 while ( TimingDelay != 0 );
61 void delay( s32 count )
64 for ( i = 0; i < count; i++ )
65 for ( j = 0; j < 1300; j++ )
80 void starting_delay(
void )
93 void Sleep_Call(
void )
111 void UTIL_LoadApp( index_t app )
130 len_t my_strlen(
const u8* p )
160 return ( GPIO_ReadInputDataBit( USB_DISCONNECT_PORT, USB_DISCONNECT_PIN ) == Bit_SET );
180 if ( ( Offs >= 8 ) && ( Offs < 0x180 ) )
181 *( tHandler* )( CIRCLEOS_RAM_BASE + Offs ) = pHDL;
202 if ( ( Offs >= 8 ) && ( Offs < 0x180 ) )
203 return *( tHandler* )( CIRCLEOS_RAM_BASE + Offs );
226 for ( i = 0; i < MAXAPP; i++ )
231 if ( ( *ApplicationTable )[ -i ] == APP_VOID )
237 addr = (
long unsigned )( *ApplicationTable )[ -i ] ;
241 if ( !strcmp( curapp->
Text, AppName ) )
268 CurrentTimerDelay = ( millisec * TIMER_MULT_RATIO ) / TIMER_DIV_RATIO ;
269 if ( !CurrentTimerDelay )
270 CurrentTimerDelay = 1;
273 CurrentEventTimer = fTimerHandler ;