Kconfig 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. menu "IO Expander/GPIO Support"
  6. config IOEXPANDER
  7. bool "Enable IO Expander Support"
  8. default n
  9. ---help---
  10. This directory holds implementations of IO expander drivers.
  11. See include/nuttx/ioexpander/ioexpander.h for registration information.
  12. if IOEXPANDER
  13. config IOEXPANDER_PCA9555
  14. bool "PCA9555 I2C IO expander"
  15. default n
  16. depends on I2C
  17. ---help---
  18. Enable support for the NXP PCA9555 IO Expander
  19. if IOEXPANDER_PCA9555
  20. config PCA9555_MULTIPLE
  21. bool "Multiple PCA9555 Devices"
  22. default n
  23. ---help---
  24. Can be defined to support multiple PCA9555 devices on board.
  25. config PCA9555_INT_ENABLE
  26. bool "Enable PCA9555 Interrupt Support"
  27. default n
  28. select IOEXPANDER_INT_ENABLE
  29. ---help---
  30. Enable driver interrupt functionality
  31. config PCA9555_INT_NCALLBACKS
  32. int "Max number of interrupt callbacks"
  33. default 4
  34. depends on PCA9555_INT_ENABLE
  35. ---help---
  36. This is the maximum number of interrupt callbacks supported
  37. config PCA9555_SHADOW_MODE
  38. bool "Use Shadow Mode instead of Read-Modify-Write Operations"
  39. default n
  40. ---help---
  41. This setting enables a mode where the output and pin
  42. configuration registers are held in RAM.
  43. With this for example we do not need to read back the
  44. output-register every time we want to change one pin.
  45. We do instead change the bit in the internal register
  46. and then just write this register to the IO-Expander.
  47. This reduces bus traffic and eliminates the problem of
  48. EMC-caused toggling of output pins.
  49. config PCA9555_RETRY
  50. bool "Retry to send commands and data at I2C communication errors"
  51. default n
  52. ---help---
  53. Retry to send commands and data if a I2C-communication
  54. error occurs (eg. caused by EMC).
  55. endif # IOEXPANDER_PCA9555
  56. config IOEXPANDER_TCA64XX
  57. bool "TCA64XX I2C IO expander"
  58. default n
  59. depends on I2C && EXPERIMENTAL
  60. ---help---
  61. Enable support for the TCA64XX IO Expander
  62. if IOEXPANDER_TCA64XX
  63. config TCA64XX_MULTIPLE
  64. bool "Multiple TCA64XX Devices"
  65. default n
  66. ---help---
  67. Can be defined to support multiple TCA64XX devices on board.
  68. config TCA64XX_INT_ENABLE
  69. bool "Enable TCA64XX Interrupt Support"
  70. default n
  71. select IOEXPANDER_INT_ENABLE
  72. ---help---
  73. Enable driver interrupt functionality
  74. config TCA64XX_INT_NCALLBACKS
  75. int "Max number of interrupt callbacks"
  76. default 4
  77. depends on TCA64XX_INT_ENABLE
  78. ---help---
  79. This is the maximum number of interrupt callbacks supported
  80. config TCA64XX_INT_POLL
  81. bool "Enable interrupt poll"
  82. default n
  83. ---help---
  84. Enable polling for missed interrupts.
  85. config TCA64XX_INT_POLLDELAY
  86. int "Interrupt poll delay (used)"
  87. default 500000
  88. depends on TCA64XX_INT_POLL
  89. ---help---
  90. This microsecond delay defines the polling rate for missed interrupts.
  91. endif # IOEXPANDER_TCA64XX
  92. config IOEXPANDER_PCF8574
  93. bool "PCF8574 I2C IO expander"
  94. default n
  95. depends on I2C && EXPERIMENTAL
  96. ---help---
  97. Enable support for the PCF8574 IO Expander
  98. if IOEXPANDER_PCF8574
  99. config PCF8574_MULTIPLE
  100. bool "Multiple PCF8574 Devices"
  101. default n
  102. ---help---
  103. Can be defined to support multiple PCF8574 devices on board.
  104. config PCF8574_INT_ENABLE
  105. bool "Enable PCF8574 Interrupt Support"
  106. default n
  107. select IOEXPANDER_INT_ENABLE
  108. ---help---
  109. Enable driver interrupt functionality
  110. config PCF8574_INT_NCALLBACKS
  111. int "Max number of interrupt callbacks"
  112. default 4
  113. depends on PCF8574_INT_ENABLE
  114. ---help---
  115. This is the maximum number of interrupt callbacks supported
  116. config PCF8574_INT_POLL
  117. bool "Enable interrupt poll"
  118. default n
  119. ---help---
  120. Enable polling for missed interrupts.
  121. config PCF8574_INT_POLLDELAY
  122. int "Interrupt poll delay (used)"
  123. default 500000
  124. depends on PCF8574_INT_POLL
  125. ---help---
  126. This microsecond delay defines the polling rate for missed interrupts.
  127. endif # IOEXPANDER_PCF8574
  128. config IOEXPANDER_INT_ENABLE
  129. bool
  130. default n
  131. ---help---
  132. This is the global INT supported flag for io expanders
  133. config IOEXPANDER_NPINS
  134. int "Number of pins"
  135. default 16
  136. ---help---
  137. Maximum number of pins supported per driver.
  138. config IOEXPANDER_MULTIPIN
  139. bool "Support multi-pin access routines"
  140. default n
  141. ---help---
  142. This settings enable the definition of routines for
  143. optimized simultaneous access to multiple pins.
  144. endif # IOEXPANDER
  145. config DEV_GPIO
  146. bool "GPIO driver"
  147. default n
  148. ---help---
  149. Enables a simple GPIO input/output driver to support application-
  150. space testing of hardware.
  151. config DEV_GPIO_NSIGNALS
  152. int "Max number of signals"
  153. default 1
  154. depends on DEV_GPIO
  155. ---help---
  156. The maximum number of signals that can be registered with the GPIO
  157. driver
  158. config GPIO_LOWER_HALF
  159. bool "GPIO Lower Half"
  160. default n
  161. depends on DEV_GPIO && IOEXPANDER
  162. ---help---
  163. Enable support for a lower half driver that provides GPIO driver
  164. support for I/O expander pins.
  165. if GPIO_LOWER_HALF
  166. config GPIO_LOWER_HALF_INTTYPE
  167. int "default interrupt type for GPIO_INTERRUPT_PIN pintype"
  168. default 14
  169. ---help---
  170. This is the default interrupt type (IOEXPANDER_VAL_BOTH) for
  171. GPIO_INTERRUPT_PIN pintype in gplf driver register.
  172. endif
  173. endmenu # IO Expander/GPIO Support