Kconfig 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. menuconfig RT_USING_RTC
  2. bool "Using RTC device drivers"
  3. default n
  4. help
  5. Enable the RTC core so hardware real-time clocks can be registered via
  6. `rt_hw_rtc_register`, the kernel can keep wall clock time across suspend/
  7. resume, and applications can query or set calendar values through the
  8. `rtc` character device. Turn this on whenever you have a peripheral or
  9. PMIC that supplies timestamp/backup registers referenced from the device
  10. tree; disable it only on chips that genuinely lack RTC hardware.
  11. if RT_USING_RTC
  12. config RT_USING_ALARM
  13. bool "Using RTC alarm"
  14. default n
  15. help
  16. Spawn the alarm service defined in `dev_alarm.c`. The driver
  17. creates an RT-Thread worker thread that reconciles user-space
  18. alarms with the RTC wakeup registers, automatically reprograms
  19. oneshot/periodic alarms, and raises callbacks when the hardware
  20. interrupt fires. Enable this if your application needs wakeup at a
  21. given date/time; leave it disabled to save RAM/CPU when alarms are
  22. not used.
  23. if RT_USING_ALARM
  24. config RT_ALARM_STACK_SIZE
  25. int "stack size for alarm thread"
  26. default IDLE_THREAD_STACK_SIZE
  27. help
  28. Specify the stack size (bytes) used by the internal alarm
  29. management thread. Increase this when alarm callbacks perform
  30. complex logic or use libc time conversions; shrink it on very
  31. constrained MCUs when you are sure the callbacks stay shallow.
  32. config RT_ALARM_TIMESLICE
  33. int "timeslice for alarm thread"
  34. default 5
  35. help
  36. Define the timeslice (OS ticks) granted to the alarm thread
  37. when it runs at the same priority as other time-sensitive
  38. tasks. Lower values make the system more responsive at the
  39. cost of additional context switches; higher values slightly
  40. delay alarm handling under load.
  41. config RT_ALARM_PRIORITY
  42. int "priority for alarm thread"
  43. default 10
  44. help
  45. RT-Thread priority (smaller numbers are higher priority) of
  46. the alarm management thread. Choose a priority above most
  47. application threads if you require deterministic wakeups, or
  48. below CPU-intensive tasks when alarm latency is less critical.
  49. config RT_ALARM_USING_LOCAL_TIME
  50. bool "Using local time for the alarm calculation"
  51. default n
  52. depends on RT_USING_ALARM
  53. help
  54. Make the alarm service convert timestamps with `mktime()` so
  55. alarms follow the configured local time zone instead of UTC.
  56. Enable this when alarms must honor daylight saving or custom
  57. offsets; otherwise keep it disabled to avoid the overhead of
  58. repeatedly converting between UTC and local time.
  59. endif
  60. config RT_USING_SOFT_RTC
  61. bool "Using software simulation RTC device"
  62. default n
  63. help
  64. Build the tick-based software RTC implementation (`dev_soft_rtc`)
  65. for boards without dedicated RTC hardware. The driver keeps time
  66. by accumulating system ticks and stores values in RAM only, so it
  67. resets to the compile-time default after power loss. Enable it for
  68. simulations or low-cost MCUs that still need an `rtc` device node;
  69. disable it when real RTC registers are available to avoid two
  70. competing time sources.
  71. endif
  72. config RT_RTC_DS1302
  73. bool "Dallas/Maxim DS1302"
  74. depends on RT_USING_DM
  75. depends on RT_USING_RTC
  76. depends on RT_USING_SPI
  77. default n
  78. config RT_RTC_DS1307
  79. bool "Dallas/Maxim DS1307/37/38/39/40, ST M41T11"
  80. depends on RT_USING_DM
  81. depends on RT_USING_RTC
  82. depends on RT_USING_I2C
  83. default n
  84. config RT_RTC_GOLDFISH
  85. bool "Goldfish Real Time Clock"
  86. depends on RT_USING_DM
  87. depends on RT_USING_RTC
  88. default n
  89. config RT_RTC_HYM8563
  90. bool "Haoyu Microelectronics HYM8563"
  91. depends on RT_USING_DM
  92. depends on RT_USING_RTC
  93. depends on RT_USING_I2C
  94. default n
  95. config RT_RTC_PCF8523
  96. bool "NXP PCF8523"
  97. depends on RT_USING_DM
  98. depends on RT_USING_RTC
  99. depends on RT_USING_I2C
  100. default n
  101. config RT_RTC_PCF8563
  102. bool "Philips PCF8563/Epson RTC8564"
  103. depends on RT_USING_DM
  104. depends on RT_USING_RTC
  105. depends on RT_USING_I2C
  106. default n
  107. config RT_RTC_PL031
  108. bool "ARM PL031"
  109. depends on RT_USING_DM
  110. depends on RT_USING_RTC
  111. default n
  112. config RT_RTC_RX8010
  113. bool "Epson RX8010SJ"
  114. depends on RT_USING_DM
  115. depends on RT_USING_RTC
  116. depends on RT_USING_I2C
  117. default n
  118. if RT_USING_DM && RT_USING_RTC
  119. osource "$(SOC_DM_RTC_DIR)/Kconfig"
  120. endif