uart_periph.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2020 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #include "soc/uart_periph.h"
  15. /*
  16. Bunch of constants for every UART peripheral: GPIO signals, irqs, hw addr of registers etc
  17. */
  18. const uart_signal_conn_t uart_periph_signal[SOC_UART_NUM] = {
  19. {
  20. .tx_sig = U0TXD_OUT_IDX,
  21. .rx_sig = U0RXD_IN_IDX,
  22. .rts_sig = U0RTS_OUT_IDX,
  23. .cts_sig = U0CTS_IN_IDX,
  24. .irq = ETS_UART0_INTR_SOURCE,
  25. .module = PERIPH_UART0_MODULE,
  26. },
  27. {
  28. .tx_sig = U1TXD_OUT_IDX,
  29. .rx_sig = U1RXD_IN_IDX,
  30. .rts_sig = U1RTS_OUT_IDX,
  31. .cts_sig = U1CTS_IN_IDX,
  32. .irq = ETS_UART1_INTR_SOURCE,
  33. .module = PERIPH_UART1_MODULE,
  34. }
  35. };