Kconfig 17 KB

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