Skip to content

Rtems timer can not be disabled #9

@bacinchel

Description

@bacinchel

I think Rtems OS_timerset() not satisfy it's description in API document

image2018-8-1_17-14-28

if ( start_time > 0 )

In POSIX API, Call OS_timerSet() with "start_msec = 0" causes timer stop but Rtems just ignore that parameter

I hope to change OSAL rtems api code to

if ( start_time > 0 ) {
OS_UsecsToTicks(start_time, &timeout);
status = rtems_timer_fire_after(OS_timer_table[timer_id].host_timerid,
timeout,
OS_TimerSignalHandler, (void *)timer_id );
if ( status != RTEMS_SUCCESSFUL )
{
return ( OS_TIMER_ERR_INTERNAL);
}
} else {
status = rtems_timer_cancel(OS_timer_table[timer_id].host_timerid);
if ( status != RTEMS_SUCCESSFUL )
{
return ( OS_TIMER_ERR_INTERNAL);
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions