uart: standalone configuration

- setup uart at boot instead of delaying until some module needs it
  removes global `SERIAL_BAUDRATE` and `DEBUG_PORT` in favour or
  globally accessible numbered port configurations with `MODULE_NAME_PORT`
- automagically enable uart support for sensors that need it
- allow every sensor to configure uart0 (normal and swapped), uart1
  and an optional software-serial mode support with an extra build flag
  remove individual includes across the sensors
- settings queries and runtime port configuration (prefixed with uart)
- update dependencies header to cross-reference used ports at build time
- update deprecations header with serial baudrate notice
This commit is contained in:
Maxim Prokhorov
2022-09-24 03:43:34 +03:00
parent 3d580f3577
commit 574fbf1960
39 changed files with 1658 additions and 1333 deletions

View File

@@ -96,7 +96,7 @@ bool AsyncWebPrint::_addBuffer() {
// - Returning 0 will immediatly close the connection from our side
// - Calling _prepareRequest() **before** _buffers are filled will result in returning 0
// - Calling yield() / delay() while request AsyncWebPrint is active **may** trigger this callback out of sequence
// (e.g. Serial.print(..), DEBUG_MSG(...), or any other API trying to switch contexts)
// (e.g. Stream.write(...), Stream.read(...), DEBUG_MSG(...), or any other API trying to switch contexts)
// - Receiving data (tcp ack from the previous packet) **will** trigger the callback when switching contexts.
void AsyncWebPrint::_prepareRequest() {