uart_periph.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2015-2019 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. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #include "soc/uart_periph.h"
  14. /*
  15. Bunch of constants for every UART peripheral: GPIO signals, irqs, hw addr of registers etc
  16. */
  17. const uart_signal_conn_t uart_periph_signal[SOC_UART_NUM] = {
  18. {
  19. .tx_sig = U0TXD_OUT_IDX,
  20. .rx_sig = U0RXD_IN_IDX,
  21. .rts_sig = U0RTS_OUT_IDX,
  22. .cts_sig = U0CTS_IN_IDX,
  23. .irq = ETS_UART0_INTR_SOURCE,
  24. .module = PERIPH_UART0_MODULE,
  25. },
  26. {
  27. .tx_sig = U1TXD_OUT_IDX,
  28. .rx_sig = U1RXD_IN_IDX,
  29. .rts_sig = U1RTS_OUT_IDX,
  30. .cts_sig = U1CTS_IN_IDX,
  31. .irq = ETS_UART1_INTR_SOURCE,
  32. .module = PERIPH_UART1_MODULE,
  33. },
  34. {
  35. .tx_sig = U2TXD_OUT_IDX,
  36. .rx_sig = U2RXD_IN_IDX,
  37. .rts_sig = U2RTS_OUT_IDX,
  38. .cts_sig = U2CTS_IN_IDX,
  39. .irq = ETS_UART2_INTR_SOURCE,
  40. .module = PERIPH_UART2_MODULE,
  41. },
  42. };