| 55 | } |
| 56 | } |
| 57 | UARTInterface::UARTInterface(uint8_t block, int8_t tx, int8_t rx, uint32_t clock) |
| 58 | { |
| 59 | if (tx == -1 || rx == -1) |
| 60 | { |
| 61 | return; |
| 62 | } |
| 63 | printf("uart: %d %d %d %d\r\n", tx, rx, block, clock); |
| 64 | uart = _hardwareBlocks[block]; |
| 65 | uart_init(uart, clock); |
| 66 | gpio_set_function(tx, GPIO_FUNC_UART); |
| 67 | gpio_set_function(rx, GPIO_FUNC_UART); |
| 68 | } |
| 69 | |
| 70 | UARTInterface::~UARTInterface() |
| 71 | { |
nothing calls this directly
no outgoing calls
no test coverage detected