コード例 #1
0
ファイル: rtc-board.c プロジェクト: bart112233/LoRaMac-node
void RtcDelayMs( uint32_t delay )
{
	TimerTime_t delayValue = 0;
	TimerTime_t timeout = 0;

	delayValue = ( TimerTime_t )( delay * 1000 );

	// Wait delay ms
	timeout = RtcGetTimerValue( );
	while ( ( ( RtcGetTimerValue( ) - timeout ) ) < delayValue )
		__NOP( );
}
コード例 #2
0
ファイル: timer.c プロジェクト: bart112233/LoRaMac-node
TimerTime_t TimerGetCurrentTime( void )
{
	if ( LowPowerModeEnable == true )
		return RtcGetTimerValue( );
	else
		return TimerHwGetTime( );
}
コード例 #3
0
ファイル: rtc-board.c プロジェクト: Lora-net/LoRaMac-node
TimerTime_t RtcComputeFutureEventTime( TimerTime_t futureEventInTime )
{
    return( RtcGetTimerValue( ) + futureEventInTime );
}