Serial ioctl functions

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Serial ioctl functions

2,084 次查看
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,289 次查看
PetrM
Senior Contributor I

Sorry, the serial driver documentation is simply not good.

Those two commands are not implemented yet.

 

PetrM

 

0 项奖励
回复

1,289 次查看
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 项奖励
回复