AnsweredAssumed Answered

Serial ioctl functions

Question asked by Angelo Quattrociocchi on Nov 21, 2010
Latest reply on Jan 10, 2011 by Angelo Quattrociocchi

I'm using MQX on a 52259 and I need to send a break sequence on a UART port. 

 

This is what I'm doing:

 

FILE_PTR fh_ptr = NULL;   

fh_ptr = (pointer)fopen("ttyb:", (pointer) (IO_SERIAL_XON_XOFF));

ioctl(fh_ptr, IO_IOCTL_SERIAL_START_BREAK, NULL);
_time_delay(200);
ioctl(fh_ptr, IO_IOCTL_SERIAL_STOP_BREAK, NULL);

 

My understanding is that I should see the Tx line go low for 200ms after doing this.  But I'm not sure I have the right commands, eg. I'm guess at the NULL argument.  The only documentation I could find on this was the "MQX I/O Drivers User's Guide".  I don't see a lot of detail in there on how to use the ioctl function, especially with these commands.

 

Is there some other documentation on the serial ioctl commands?

 

Thanks,

Angelo

Outcomes