[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rtl] rt_com. [ rt_com_write() ]



> 1) How can I check out that 'rt_com_write()' has successfully written no. of
> characters to port?...As Man page says 'int' as return value...which means no.
> bytes read...But actually in source code of rt_com.o it's return type is
> 'void'.[ I am using RTLinuxV3.0 ]
> 
> So How can I ensure that 'rt_com_write()' successfully executed?
> [ I don't want to use 'rt_com_read()' ok...]

You can modify rt_com_write to return an int.

> 2) How can I implement 'timers' using 'rtlinuxV3.0'...which fires at say every
> 500ms. and also able to kill it when not used...?

You can create a thread that does clock_nanosleep in a loop.
To stop this "timer", cancel the thread.

Michael.
the