Home |
RTKernel-32 Programming Manual Function COMSetProtocol Function COMWaitSendBufferEmpty |
Function COMSetProtocolCOMSetProtocol can set the desired protocol for a particular port: void COMSetProtocol(int Port, int Prot, unsigned ProtTaskPrio, RTKDuration PollCycle); ParametersPortThe port to configure. ProtThe protocol to set. This parameter may have one of the following values: COM_PROT_NONE, COM_PROT_XON_XOFF, COM_PROT_RTS_CTS, COM_PROT_DTR_DSR. ProtTaskPrioThis parameter specifies the priority of the RTCom internal task which implements the active protocol. If it is 0 (COM_PASSIVE), this task is not created and the protocol is passive. For any other valid thread priority in the range RTK_MIN_PRIO..RTK_MAX_PRIO (1..256), the protocol is active. PollCycleIf ProtTaskPrio is not equal to COM_PASSIVE, parameter PollCycle specifies the interval in timer ticks to check whether a protocol action is required on any port. Only one such protocol task is created for all ports. The last values given for ProtTaskPrio and PollCycle apply. If this function is never called for a specific port, no protocol is assumed. Protocols are only supported for interrupt-driven communication.
|