68681/2681 duart: When a channel is in loopback mode, do not actually transmit bytes sent to that duart channel over the TX pin

This commit is contained in:
Jonathan Gevaryahu 2009-09-10 06:13:26 +00:00
parent 9f9c029a08
commit 224c8d3f97

View File

@ -377,7 +377,9 @@ static TIMER_CALLBACK( tx_timer_callback )
duart68681_state *duart68681 = get_safe_token(device);
int ch = param & 1;
if (duart68681->duart_config->tx_callback)
// send the byte unless we're in loopback mode;
// in loopback mode do NOT 'actually' send the byte: the TXn pin is held high when loopback mode is on.
if ((duart68681->duart_config->tx_callback) && ((duart68681->channel[ch].MR2&0xC0) != 0x80))
duart68681->duart_config->tx_callback(device, ch, duart68681->channel[ch].tx_data);
duart68681->channel[ch].tx_ready = 1;