Download MCF5407SWRM - Freescale Semiconductor
Transcript
Freescale Semiconductor, Inc. Support Modules flow_control Call(s): void flow_control (struct channel_t * channel); Arguments: Table 3-78. flow_control arguments channel Freescale Semiconductor, Inc... Description: in Pointer to the Channel control data structure This function performs Data Flow Control according to the S[18] register settings. The Soft Modem implements flow control by detecting that Tx_uart_data[] is full enough (defined by the UART_DATA_FLOW_STOP value, in “modem.h”) and then negates the Request to Send (RTS) signal in the case of Hardware flow control or sends a special character XOFF into the data stream in the case of Software flow control, to stop the flow of data. When the buffer Tx_uart_data[] is empty enough again (defined by the UART_DATA_FLOW_START value , in “modem.h”), it asserts the RTS signal in the case of Hardware flow control or sends the special character XON into the data stream in the case of Software flow control to restart the flow of data. The problem with software flow control is that the characters used to stop and start the flow of data can occur naturally in the data flow, enabling software flow control instructions. Using software flow control may prove satisfactory if you are transferring text files only. Hardware flow control is much faster and much more reliable than software flow control, so it is highly recommended to use this. This function is called in state_machine(). Returns: None. Code example: ... struct channel_t channel; ... flow_control(&channel); ... MOTOROLA Chapter 3. Module Descriptions For More Information On This Product, Go to: www.freescale.com 3-181