Adds UART RX IRQ Callback with onReceive() (#6134)

* Adds UART RX IRQ Callback with onReceive()
This commit is contained in:
Rodrigo Garcia
2022-01-17 11:04:12 -03:00
committed by GitHub
parent 5ae3886c66
commit c014eaf352
4 changed files with 93 additions and 8 deletions

View File

@ -159,6 +159,11 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
}
}
void HardwareSerial::onReceive(void(*function)(void))
{
uartOnReceive(_uart, function);
}
void HardwareSerial::updateBaudRate(unsigned long baud)
{
uartSetBaudRate(_uart, baud);