///////////////////////////////////////////////////////////////////////////////
//  GetDebounce
///////////////////////////////////////////////////////////////////////////////
UINT32 LPC22XX_GPIO_Driver::GetDebounce()
{
// TODO: Need to implement
//hal_printf( "GetDebounce\r\n");

    return CPU_TicksToTime( g_LPC22XX_GPIO_Driver.m_DebounceTicks ) / 10000;
}
UINT32 AT91_GPIO_Driver::GetDebounce()
{
#if !defined(PLATFORM_ARM_SAM7_ANY)
    return CPU_TicksToTime( g_AT91_GPIO_Driver.m_DebounceTicks ) / TIME_CONVERSION__TO_MILLISECONDS;
#else
    // assume that it takes 16 ticks for each ms the user wants
    // this of course needs calibration and it boils down to assessing 
    // what the loop in HandleDebounce takes
    return (AT91_GPIO_Driver::PIN_ISR_DESCRIPTOR::c_DebounceCount >> 4);
#endif
}
Пример #3
0
INT64 LPC24XX_TIME_Driver::CurrentTime()
{
    //return Time_TicksToTime(Time_CurrentTicks());
    // we collapse the above to improve perf on a high hit function

    INT64 Time = CPU_TicksToTime( CounterValue() );

#if defined(HAL_TIMEWARP)
    return s_timewarp_compensate + Time;
#else
    return Time;
#endif
}
INT64 HAL_Time_CurrentTime()
{
    return CPU_TicksToTime( HAL_Time_CurrentTicks() );
}
INT64 HAL_Time_TicksToTime( UINT64 Ticks )
{
    return CPU_TicksToTime( Ticks );
}
Пример #6
0
INT64 LPC24XX_TIME_Driver::TicksToTime( UINT64 Ticks )
{
    return CPU_TicksToTime( Ticks );
}
Пример #7
0
///////////////////////////////////////////////////////////////////////////////
//  GetDebounce
///////////////////////////////////////////////////////////////////////////////
UINT32 LPC24XX_GPIO_Driver::GetDebounce()
{

    return CPU_TicksToTime( g_LPC24XX_GPIO_Driver.m_DebounceTicks ) / 10000;
}
INT64 AT91_TIME_Driver::CurrentTime()
{
    return CPU_TicksToTime( CounterValue() );
}
INT64 AT91_TIME_Driver::TicksToTime( UINT64 Ticks )
{
    return CPU_TicksToTime( Ticks );
}
Пример #10
0
UINT32 AT91_GPIO_Driver::GetDebounce()
{
    return CPU_TicksToTime( g_AT91_GPIO_Driver.m_DebounceTicks ) / TIME_CONVERSION__TO_MILLISECONDS;
}
INT64 HAL_Time_CurrentTime()
{
	return CPU_TicksToTime(CounterValue());
}