Serial ioctl functions

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Serial ioctl functions

1,927件の閲覧回数
ARQuattr
Contributor IV

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

0 件の賞賛
返信
2 返答(返信)

1,132件の閲覧回数
PetrM
Senior Contributor I

Sorry, the serial driver documentation is simply not good.

Those two commands are not implemented yet.

 

PetrM

 

0 件の賞賛
返信

1,132件の閲覧回数
ARQuattr
Contributor IV

Thank you PetrM, it's good at least to get confirmation that I'm having the same issues as others.

 

For now, I'm doing this:

 

    MCF_UART1_UCR = MCF_UART_UCR_START_BREAK;
    _time_delay(200);
    MCF_UART1_UCR = MCF_UART_UCR_STOP_BREAK;

 

 

0 件の賞賛
返信