calculate_baudrate()
Construct a new calculate baudrate object A Baud rate for the FT232R, FT2232 (UART mode) or FT232B is generated using the chips internal 48MHz clock. This is input to Baud rate generator circuitry where it is then divided by 16 and fed into a prescaler as a 3MHz reference clock. This 3MHz reference clock is then divided down to provide the required Baud rate for the device's on chip UART. The value of the Baud rate divisor is an integer plus a sub-integer prescaler. Allowed values for the Baud rate divisor are: Divisor = n + 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875; where n is an integer between 2 and 16384 (214). Note: Divisor = 1 and Divisor = 0 are special cases. A divisor of 0 will give 3 MBaud, and a divisor of 1 will give 2 MBaud. Sub-integer divisors between 0 and 2 are not allowed. Therefore the value of the divisor needed for a given Baud rate is found by dividing 3000000 by the required Baud rate. @see FTDI AN232B-05 Configuring FT232R, FT2232 and FT232B Baud Rates.
line_coding_set()
Set Line Coding method.
set_control_line_state()
Set Control Line State method.
ftdi_rx()
FT23x's RX data handler First two bytes are status bytes, the RX data start at data[2]. Coding of status bytes: Byte 0: Bit 0: Full Speed packet Bit 1: High Speed packet Bit 4: CTS Bit 5: DSR Bit 6: RI Bit 7: DCD Byte 1: Bit 1: RX overflow Bit 2: Parity error Bit 3: Framing error Bit 4: Break received Bit 5: Transmitter holding register empty Bit 6: Transmitter empty @todo When CTS is asserted, this driver should stop sending data.
ftdi_event()