MCPcopy Create free account
hub / github.com/Santroller/Santroller / UARTInterface

Method UARTInterface

lib/peripherals/uart.cpp:57–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56}
57UARTInterface::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
70UARTInterface::~UARTInterface()
71{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected