| 85 | static Serial uart_in_use[2] = {0, 0}; |
| 86 | |
| 87 | int uart_for_pin(int transmit, int receive) |
| 88 | { |
| 89 | int i; |
| 90 | if (UART_PIN_NO_CHANGE != transmit) { |
| 91 | for (i=0; uart_chan_0_tx[i] != 0xff; i++) |
| 92 | if (uart_chan_0_tx[i] == transmit) |
| 93 | return 0; |
| 94 | for (i=0; uart_chan_1_tx[i] != 0xff; i++) |
| 95 | if (uart_chan_1_tx[i] == transmit) |
| 96 | return 1; |
| 97 | } |
| 98 | else if (UART_PIN_NO_CHANGE != receive) { |
| 99 | for (i=0; uart_chan_0_tx[i] != 0xff; i++) |
| 100 | if (uart_chan_0_rx[i] == receive) |
| 101 | return 0; |
| 102 | for (i=0; uart_chan_1_tx[i] != 0xff; i++) |
| 103 | if (uart_chan_1_rx[i] == receive) |
| 104 | return 1; |
| 105 | } |
| 106 | return -1; |
| 107 | } |
| 108 | |
| 109 | void xs_serial_constructor(xsMachine *the) |
| 110 | { |
no outgoing calls
no test coverage detected