µTasker Forum
µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: neil on September 19, 2009, 11:54:42 AM
-
Hi Mark,
I change the settings of the serial port using fnOpen( TYPE_TTY, MODIFY_CONFIG, &tInterfaceParameters ) command, but sometimes I have to change the handshaking. After fnOpen(..) is called with the MODIFY_CONFIG, can I simply use the below to switch on CTS and RTS?
fnDriver( PortID, (MODIFY_INTERRUPT | ENABLE_CTS_CHANGE), 0 );
fnDriver( PortID, (MODIFY_CONTROL | SET_RTS), 0 );
When changing back to non handshaking mode, how do I disable the above?
Regards
Neil
-
Hi Neil
Yes, the method of enabling CTS is correct (this enables the CTS interrupt which controls flow control). The RTS output control is in fact independent of the CTS control so can be always changed as desired.
To disable the mode you can then use
fnDriver( PortID, (MODIFY_INTERRUPT | DISABLE_CTS_CHANGE), 0 );
Regards
Mark