Kconfig 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. menuconfig RT_USING_SERIAL
  2. bool "Using Serial device drivers"
  3. select RT_USING_DEVICE_IPC
  4. select RT_USING_DEVICE
  5. default y
  6. help
  7. Enable the UART/USART driver framework that backs the console and TTY
  8. devices. Required for shell access or any serial communications.
  9. if RT_USING_SERIAL
  10. choice RT_USING_SERIAL_VERSION
  11. prompt "Choice Serial version"
  12. default RT_USING_SERIAL_V1
  13. config RT_USING_SERIAL_V1
  14. bool "RT_USING_SERIAL_V1"
  15. config RT_USING_SERIAL_V2
  16. bool "RT_USING_SERIAL_V2"
  17. help
  18. Select between the legacy serial core (V1) and the newer buffer/ISR
  19. design (V2). Choose V2 for advanced buffer strategies, otherwise stay
  20. with V1 for compatibility.
  21. endchoice
  22. choice RT_USING_SERIAL_MODE
  23. prompt "Choice Serial version"
  24. depends on RT_USING_SERIAL_V2
  25. default RT_SERIAL_BUF_STRATEGY_OVERWRITE
  26. config RT_SERIAL_BUF_STRATEGY_DROP
  27. bool "drop new incoming data when the buffer is full"
  28. config RT_SERIAL_BUF_STRATEGY_OVERWRITE
  29. bool "overwrite old data when the buffer is full"
  30. help
  31. Define how V2 RX buffers behave on overflow: drop new bytes or
  32. overwrite oldest data.
  33. endchoice
  34. config RT_SERIAL_USING_DMA
  35. bool "Enable serial DMA mode"
  36. default y
  37. help
  38. Allow serial drivers to use DMA for RX/TX to reduce CPU load. Turn
  39. off if your SoC lacks UART DMA support.
  40. config RT_SERIAL_RB_BUFSZ
  41. int "Set RX buffer size"
  42. depends on !RT_USING_SERIAL_V2
  43. default 64
  44. help
  45. Size of the legacy (V1) receive ring buffer in bytes.
  46. config RT_USING_SERIAL_BYPASS
  47. bool "Using serial bypass"
  48. default n
  49. help
  50. Enable bypass mode that forwards data between two serial devices,
  51. useful for debugging or bridging.
  52. endif
  53. if RT_USING_DM && RT_USING_SERIAL
  54. rsource "device/Kconfig"
  55. endif