Kconfig 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  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. config NX
  6. bool "NX Graphics"
  7. default n
  8. select NXGLIB
  9. select NXFONTS
  10. ---help---
  11. Enables overall support for graphics library and NX
  12. if NX
  13. config NX_LCDDRIVER
  14. bool "LCD driver"
  15. default y
  16. depends on LCD
  17. ---help---
  18. By default, the NX graphics system uses the frame buffer driver interface
  19. defined in include/nuttx/video/fb.h. However, if LCD is support is enabled,
  20. this this option is provide to select, instead, the LCD driver interface
  21. defined in include/nuttx/lcd/lcd.h.
  22. config NX_NDISPLAYS
  23. int "Maximum number of displays supported"
  24. default 1
  25. range 1 9
  26. ---help---
  27. The maximum number of displays that can be supported by the NX server.
  28. Normally this takes the value one but may be increased to support systems
  29. with multiple displays.
  30. config NX_NPLANES
  31. int "Number of Color Planes"
  32. default 1
  33. range 1 8
  34. ---help---
  35. Some YUV color formats requires support for multiple planes, one for
  36. each color component. Unless you have such special hardware (and
  37. are willing to debug a lot of untested logic), this value should be
  38. set to 1.
  39. config NX_RAMBACKED
  40. bool "RAM backed windows"
  41. default n
  42. ---help---
  43. If this option is selected, then windows may be optionally created
  44. with a RAM frambuffer backing up the window content. Rending into
  45. the window will result in rending into the backup framebuffer, then
  46. updating the physical display from the framebuffer.
  47. The advantage of this option is that the application that manages
  48. window will no longer receive redraw() callbacks. Those calls
  49. normally occur when a window "above" moves exposing a portion of the
  50. window below. If this option is selected, then the system will
  51. redraw the exposed portion of the window from the backup framebuffer
  52. without intervention of the window applications. This greatly
  53. reduces the complexity of the application and performance of the
  54. window at the expense of increased memory usage.
  55. Redraw requests in other cases are also suppressed: Changes to window
  56. position, size, etc. As a consequence, some manual updates will be
  57. required when certain events occur (like removing a toolbar from a
  58. window).
  59. An exception is the case when the window is resized to a wider and/or
  60. taller size. In that case, the redraw callback will till occur.
  61. It is necessary in that case to provide new graphic content for the
  62. extended window area.
  63. Redraw requests in other cases are also suppressed: Changes to window
  64. position, size, etc. As a consequence, some manual updates will be
  65. required when certain events occur (like removing a toolbar from a
  66. window).
  67. NOTE: A significant amount of RAM, usually external SDRAM, may be
  68. required to use per-window framebuffers.
  69. choice
  70. prompt "Cursor support"
  71. default NX_NOCURSOR
  72. config NX_NOCURSOR
  73. bool "No cursor support"
  74. config NX_SWCURSOR
  75. bool "Software cursor support"
  76. depends on !NX_LCDDRIVER && NX_DISABLE_1BPP && NX_DISABLE_2BPP && NX_DISABLE_4BPP && !BUILD_KERNEL
  77. ---help---
  78. Software cursor support has several dependencies are due to un-
  79. implemented cursor capabilities. This assumes the following:
  80. 1. You are using a framebuffer hardware interface. This is
  81. because the logic to implement this feature on top of the LCD
  82. interface has not been implemented.
  83. 2. The pixel depth is greater then or equal to 8-bits (8-bpp,
  84. 16-bpp, 24/32/-bpp). This is because the logic to handle
  85. pixels smaller than 1-byte has not been implemented,
  86. 3. For FLAT and PROTECTED builds only. In those builds, the
  87. cursor image resides in the common application space and is
  88. assumed to pesist as long as needed. But with the KERNEL
  89. build, the image will lie in a process space and will not be
  90. generally available. In that case, we could keep the image in
  91. a shared memory region or perhaps copy the image into a kernel
  92. internal buffer. Neither of those are implemented.
  93. config NX_HWCURSOR
  94. bool "Software cursor support"
  95. depends on (FB_HWCURSOR || LCD_HWCURSOR) && EXPERIMENTAL
  96. ---help---
  97. Hardware cursor support has not been implemented, hence the
  98. EXPERIMENTAL dependency.
  99. endchoice # Cursor support
  100. config NX_HWCURSORIMAGE
  101. bool "Support cursor images"
  102. default n
  103. depends on NX_HWCURSOR
  104. config NX_BGCOLOR
  105. hex "Initial background color"
  106. default 0x0
  107. ---help---
  108. NX will clear the background plane initially. This is the default
  109. color that will be used when the background is cleared. Note: This
  110. logic would have to be extended if you want to support multiple
  111. color planes.
  112. config NX_ANTIALIASING
  113. bool "Anti-aliasing support"
  114. default n
  115. depends on (!NX_DISABLE_16BPP || !NX_DISABLE_24BPP || !NX_DISABLE_32BPP) && !NX_LCDDRIVER
  116. ---help---
  117. Enable support for anti-aliasing when rendering lines as various
  118. orientations.
  119. config NX_WRITEONLY
  120. bool "Write-only Graphics Device"
  121. default y if NX_LCDDRIVER && LCD_NOGETRUN
  122. default n if !NX_LCDDRIVER || !LCD_NOGETRUN
  123. ---help---
  124. Define if the underlying graphics device does not support read operations.
  125. Automatically defined if NX_LCDDRIVER and LCD_NOGETRUN are
  126. defined.
  127. config NX_UPDATE
  128. bool "Display update hooks"
  129. default n
  130. ---help---
  131. Enable a callout to inform some external module that the display has
  132. been updated. This would be useful in a couple for cases.
  133. - When a serial LCD is used, but a framebuffer is used to access the
  134. LCD. In this case, the update callout can be used to refresh the
  135. affected region of the display.
  136. - When VNC is enabled. This is case, this callout is necessary to
  137. update the remote frame buffer to match the local framebuffer.
  138. When this feature is enabled, some external logic must provide this
  139. interface:
  140. void nx_notify_rectangle(FAR NX_PLANEINFOTYPE *pinfo,
  141. FAR const struct nxgl_rect_s *rect);
  142. That is the function that will handle the notification. It
  143. receives the rectangular region that was updated in the provided
  144. plane.
  145. menu "Supported Pixel Depths"
  146. config NX_DISABLE_1BPP
  147. bool "Disable 1 BPP"
  148. default y
  149. select NXFONTS_DISABLE_1BPP if NXFONTS
  150. ---help---
  151. NX supports a variety of pixel depths. You can save some memory by disabling
  152. support for unused color depths. The selection disables support for 1BPP
  153. pixel depth.
  154. config NX_DISABLE_2BPP
  155. bool "Disable 2 BPP"
  156. default y
  157. select NXFONTS_DISABLE_2BPP
  158. ---help---
  159. NX supports a variety of pixel depths. You can save some memory by disabling
  160. support for unused color depths. The selection disables support for 2BPP
  161. pixel depth.
  162. config NX_DISABLE_4BPP
  163. bool "Disable 4 BPP"
  164. select NXFONTS_DISABLE_4BPP if NXFONTS
  165. default y
  166. ---help---
  167. NX supports a variety of pixel depths. You can save some memory by disabling
  168. support for unused color depths. The selection disables support for 4BPP
  169. pixel depth.
  170. config NX_DISABLE_8BPP
  171. bool "Disable 8 BPP"
  172. default y
  173. select NXFONTS_DISABLE_8BPP if NXFONTS
  174. ---help---
  175. NX supports a variety of pixel depths. You can save some memory by disabling
  176. support for unused color depths. The selection disables support for 8BPP
  177. pixel depth.
  178. config NX_DISABLE_16BPP
  179. bool "Disable 16 BPP"
  180. default y
  181. select NXFONTS_DISABLE_16BPP if NXFONTS
  182. ---help---
  183. NX supports a variety of pixel depths. You can save some memory by disabling
  184. support for unused color depths. The selection disables support for 16BPP
  185. pixel depth.
  186. config NX_DISABLE_24BPP
  187. bool "Disable 24 BPP"
  188. default y
  189. select NXFONTS_DISABLE_24BPP if NXFONTS
  190. ---help---
  191. NX supports a variety of pixel depths. You can save some memory by disabling
  192. support for unused color depths. The selection disables support for 24BPP
  193. pixel depth.
  194. config NX_DISABLE_32BPP
  195. bool "Disable 32 BPP"
  196. default y
  197. select NXFONTS_DISABLE_32BPP if NXFONTS
  198. ---help---
  199. NX supports a variety of pixel depths. You can save some memory by disabling
  200. support for unused color depths. The selection disables support for 32BPP
  201. pixel depth.
  202. endmenu
  203. config NX_PACKEDMSFIRST
  204. bool "Packed MS First"
  205. default y
  206. select NXFONTS_PACKEDMSFIRST if NXFONTS
  207. select LCD_PACKEDMSFIRST if LCD
  208. ---help---
  209. If a pixel depth of less than 8-bits is used, then NX needs to know if the
  210. pixels pack from the MS to LS or from LS to MS
  211. menu "Input Devices"
  212. config NX_XYINPUT
  213. bool
  214. default n
  215. choice
  216. prompt "Mouse/Touchscreen Support"
  217. default NX_XYINPUT_NONE
  218. config NX_XYINPUT_NONE
  219. bool "No X/Y input device"
  220. ---help---
  221. There is no X/Y positional input device connected
  222. config NX_XYINPUT_MOUSE
  223. bool "Mouse device support"
  224. select NX_XYINPUT
  225. ---help---
  226. X/Y positional input is provided by a mouse. The only difference
  227. between the mouse and touchscreen selection is in the presence or
  228. absence of the mouse buttons. This difference is not used within
  229. NuttX itself, however, graphics applications may need this
  230. information, for example, to handle the different ways that graphic
  231. elements are selected and dragged.
  232. config NX_XYINPUT_TOUCHSCREEN
  233. bool "Touchscreen device support"
  234. select NX_XYINPUT
  235. ---help---
  236. X/Y positional input is provided by a touchscreen. The only difference
  237. between the mouse and touchscreen selection is in the presence or
  238. absence of the mouse buttons. This difference is not used within
  239. NuttX itself, however, graphics applications may need this
  240. information, for example, to handle the different ways that graphic
  241. elements are selected and dragged.
  242. endchoice # Mouse/Touchscreen Support
  243. config NX_KBD
  244. bool "Keyboard Support"
  245. default n
  246. ---help---
  247. Build in support of keypad/keyboard input.
  248. endmenu
  249. menu "Framed Window Borders"
  250. config NXTK_BORDERWIDTH
  251. int "Border Width"
  252. default 4
  253. ---help---
  254. Specifies with with of the border (in pixels) used with framed windows.
  255. The default is 4.
  256. config NXTK_DEFAULT_BORDERCOLORS
  257. bool "Use Default Border Colors"
  258. default y
  259. ---help---
  260. If this option is defined, the default system border colors will be
  261. used on framed windows. Otherwise, additional options will be
  262. present so that you can define custom board colors.
  263. if !NXTK_DEFAULT_BORDERCOLORS
  264. config NXTK_BORDERCOLOR1
  265. hex "Border Color"
  266. default 0x0
  267. ---help---
  268. Specify the colors of the border used with framed windows.
  269. NXTL_BORDERCOLOR1 is the "normal" color of the border.
  270. NXTK_BORDERCOLOR2 is the shadow side color and so is normally darker.
  271. NXTK_BORDERCOLOR3 is the shiny side color and so is normally brighter.
  272. config NXTK_BORDERCOLOR2
  273. hex "Darker Border Color"
  274. default 0x0
  275. ---help---
  276. Specify the colors of the border used with framed windows.
  277. NXTL_BORDERCOLOR1 is the "normal" color of the border.
  278. NXTK_BORDERCOLOR2 is the shadow side color and so is normally darker.
  279. NXTK_BORDERCOLOR3 is the shiny side color and so is normally brighter.
  280. config NXTK_BORDERCOLOR3
  281. hex "Brighter Border Color"
  282. default 0x0
  283. ---help---
  284. Specify the colors of the border used with framed windows.
  285. NXTL_BORDERCOLOR1 is the "normal" color of the border.
  286. NXTK_BORDERCOLOR2 is the shadow side color and so is normally darker.
  287. NXTK_BORDERCOLOR3 is the shiny side color and so is normally brighter.
  288. endif # !NXTK_DEFAULT_BORDERCOLORS
  289. endmenu
  290. config NXTK_AUTORAISE
  291. bool "Autoraise"
  292. default n
  293. ---help---
  294. If set, a window will be raised to the top if the mouse position is over a
  295. visible portion of the window. Default: A mouse button must be clicked over
  296. a visible portion of the window.
  297. menuconfig NXTERM
  298. bool "NxTerm"
  299. default n
  300. ---help---
  301. Enables building of the NxTerm driver.
  302. if NXTERM
  303. comment "NxTerm Output Text/Graphics Options"
  304. config NXTERM_BPP
  305. int "NxTerm BPP"
  306. default 1 if !NX_DISABLE_1BPP
  307. default 2 if !NX_DISABLE_2BPP
  308. default 4 if !NX_DISABLE_4BPP
  309. default 8 if !NX_DISABLE_8BPP
  310. default 16 if !NX_DISABLE_16BPP
  311. default 24 if !NX_DISABLE_24BPP
  312. default 32 if !NX_DISABLE_32BPP
  313. ---help---
  314. Currently, NxTerm supports only a single pixel depth. This
  315. configuration setting must be provided to support that single pixel depth.
  316. Default: The smallest enabled pixel depth. (see NX_DISABLE_*BPP)
  317. config NXTERM_CURSORCHAR
  318. int "Character code to use as the cursor"
  319. default 137
  320. ---help---
  321. The bitmap code to use as the cursor. Default '_' (137)
  322. config NXTERM_MXCHARS
  323. int "Max Characters on Display"
  324. default 128
  325. ---help---
  326. NxTerm needs to remember every character written to the console so
  327. that it can redraw the window. This setting determines the size of some
  328. internal memory allocations used to hold the character data. Default: 128.
  329. config NXTERM_CACHESIZE
  330. int "Font Cache Size"
  331. default 16
  332. ---help---
  333. NxTerm supports caching of rendered fonts. This font caching is required
  334. for two reasons: (1) First, it improves text performance, but more
  335. importantly (2) it preserves the font memory. Since the NX server runs on
  336. a separate server thread, it requires that the rendered font memory persist
  337. until the server has a chance to render the font. Unfortunately, the font
  338. cache would be quite large if all fonts were saved. The NXTERM_CACHESIZE
  339. setting will control the size of the font cache (in number of glyphs). Only that
  340. number of the most recently used glyphs will be retained. Default: 16.
  341. NOTE: There can still be a race condition between the NxTerm driver and the
  342. NX task. If you every see character corruption (especially when printing
  343. a lot of data or scrolling), then increasing the value of NXTERM_CACHESIZE
  344. is something that you should try. Alternatively, you can reduce the size of
  345. MQ_MAXMSGSIZE which will force NxTerm task to pace the server task.
  346. NXTERM_CACHESIZE should be larger than MQ_MAXMSGSIZE in any event.
  347. config NXTERM_LINESEPARATION
  348. int "Line Separation"
  349. default 0
  350. ---help---
  351. This the space (in rows) between each row of test. Default: 0
  352. config NXTERM_NOWRAP
  353. bool "No wrap"
  354. default n
  355. ---help---
  356. By default, lines will wrap when the test reaches the right hand side
  357. of the window. This setting can be defining to change this behavior so
  358. that the text is simply truncated until a new line is encountered.
  359. comment "NxTerm Input options"
  360. config NXTERM_NXKBDIN
  361. bool "NX KBD input"
  362. default n
  363. ---help---
  364. Take input from the NX keyboard input callback. By default, keyboard
  365. input is taken from stdin (/dev/console). If this option is set, then
  366. the interface nxterm_kdbin() is enabled. That interface may be driven
  367. by window callback functions so that keyboard input *only* goes to the
  368. top window.
  369. NOTE: nxterm_kdbin() is an internal OS API. It can be accessed by
  370. applications via the boardctl(BOARDIOC_NXTERM) interface.
  371. The logic path is complex in this case: (1) The keyboard input is
  372. received by an application listener thread and injected into NX via
  373. nx_kbdin(). NX sends (2) the keyboard input to single the NX window
  374. that has focus. That window then (3) gives the keyboard input to the
  375. single NxTerm associated with the window via boardctl(BOARDIOC_NXTERM).
  376. NOTE: If CONFIG_NXTERM_NXKBDIN not defined, then NxTerm input coming
  377. directly from /dev/console. That works well if there is only a single
  378. NxTerm window. But if there are multiple NxTerm windows, then it is
  379. anyone's guess which will receive the keyboard input. That does not
  380. work well in such cases.
  381. config NXTERM_KBDBUFSIZE
  382. int "Keyboard Input Buffer Size"
  383. default 16
  384. ---help---
  385. If NXTERM_NXKBDIN is enabled, then this value may be used to
  386. define the size of the per-window keyboard input buffer. Default: 16
  387. config NXTERM_NPOLLWAITERS
  388. int "Number of Poll Waiters"
  389. default 4
  390. ---help---
  391. The number of threads that can be waiting for read data available.
  392. Default: 4
  393. endif # NXTERM
  394. comment "NX server options"
  395. config NX_BLOCKING
  396. bool "Blocking"
  397. default n
  398. ---help---
  399. Open the client message queues in blocking mode. In this case,
  400. nx_eventhandler() will not return until a message is received and processed.
  401. config NX_MXSERVERMSGS
  402. int "Max Server Messages"
  403. default 32
  404. ---help---
  405. Specifies the maximum number of messages that can fit in the message queues.
  406. No additional resources are allocated, but this can be set to prevent
  407. flooding of the client or server with too many messages (PREALLOC_MQ_MSGS
  408. controls how many messages are pre-allocated).
  409. config NX_MXCLIENTMSGS
  410. int "Max Client Messages"
  411. default 16
  412. ---help---
  413. Specifies the maximum number of messages that can fit in the message queues.
  414. No additional resources are allocated, but this can be set to prevent
  415. flooding of the client or server with too many messages (PREALLOC_MQ_MSGS
  416. controls how many messages are pre-allocated).
  417. config NXSTART_EXTERNINIT
  418. bool "External Display Initialization"
  419. default n
  420. select LCD_EXTERNINIT if LCD && LCD_FRAMEBUFFER && NX_LCDDRIVER
  421. ---help---
  422. Define to support external display initialization by platform-
  423. specific code. This this option is defined, then nxmu_start()
  424. will call board_graphics_setup(CONFIG_NXSTART_DEVNO) to initialize
  425. the graphics device. This option is necessary if display is used
  426. that cannot be initialized using the standard LCD or framebuffer
  427. interfaces.
  428. config NXSTART_SERVERPRIO
  429. int "NX Server priority"
  430. default 110
  431. ---help---
  432. Priority of the NX server. Default: 110.
  433. NOTE: NXSTART_SERVERPRIO should have a relatively high priority to
  434. avoid data overrun race conditions.
  435. config NXSTART_SERVERSTACK
  436. int "NX Server Stack Size"
  437. default 2048
  438. ---help---
  439. NX server thread stack size (in multi-user mode). Default 2048
  440. config NXSTART_DEVNO
  441. int "LCD Device Number"
  442. default 0
  443. depends on NX_LCDDRIVER || NXSTART_EXTERNINIT
  444. ---help---
  445. LCD device number (in case there are more than one LCDs connected).
  446. Default: 0
  447. source "graphics/vnc/Kconfig"
  448. endif # NX