summaryrefslogtreecommitdiff
path: root/nuttx/graphics/Kconfig
blob: 85e2164a8cb4a4c0b13ae4d6868c021bbf8d1e98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
#
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#

config NX
	bool "NX Graphics"
	default n
	---help---
		Enables overall support for graphics library and NX

if NX

config NX_LCDDRIVER
	bool "LCD driver"
	default y
	depends on LCD
	---help---
		By default, the NX graphics system uses the frame buffer driver interface
		defined in include/nuttx/video/fb.h.  However, if LCD is support is enabled,
		this this option is provide to select, instead, the LCD driver interface
		defined in include/nuttx/lcd/lcd.h.

config NX_NPLANES
	int "Number of Color Planes"
	default 1
	---help---
		Some YUV color formats requires support for multiple planes, one for
		each color component.  Unless you have such special hardware (and
		are willing to debug a lot of untested logic), this value should be
		set to 1.

config NX_BGCOLOR
	hex "Initial background color"
	default 0x0
	---help---
		NX will clear the background plane initially.  This is the default
		color that will be used when the background is cleared.  Note: This
		logic would have to be extended if you want to support multiple
		color planes.

config NX_WRITEONLY
	bool "Write-only Graphics Device"
	default y if NX_LCDDRIVER && LCD_NOGETRUN
	default n if !NX_LCDDRIVER || !LCD_NOGETRUN
	---help---
		Define if the underlying graphics device does not support read operations.
		Automatically defined if NX_LCDDRIVER and LCD_NOGETRUN are
		defined.

menu "Supported Pixel Depths"

config NX_DISABLE_1BPP
	bool "Disable 1 BPP"
	default y
	---help---
		NX supports a variety of pixel depths.  You can save some memory by disabling
		support for unused color depths.  The selection disables support for 1BPP
		pixel depth.

config NX_DISABLE_2BPP
	bool "Disable 2 BPP"
	default y
	---help---
		NX supports a variety of pixel depths.  You can save some memory by disabling
		support for unused color depths.  The selection disables support for 2BPP
		pixel depth.

config NX_DISABLE_4BPP
	bool "Disable 4 BPP"
	default y
	---help---
		NX supports a variety of pixel depths.  You can save some memory by disabling
		support for unused color depths.  The selection disables support for 4BPP
		pixel depth.

config NX_DISABLE_8BPP
	bool "Disable 8 BPP"
	default y
	---help---
		NX supports a variety of pixel depths.  You can save some memory by disabling
		support for unused color depths.  The selection disables support for 8BPP
		pixel depth.

config NX_DISABLE_16BPP
	bool "Disable 16 BPP"
	default y
	---help---
		NX supports a variety of pixel depths.  You can save some memory by disabling
		support for unused color depths.  The selection disables support for 16BPP
		pixel depth.

config NX_DISABLE_24BPP
	bool "Disable 24 BPP"
	default y
	---help---
		NX supports a variety of pixel depths.  You can save some memory by disabling
		support for unused color depths.  The selection disables support for 24BPP
		pixel depth.

config NX_DISABLE_32BPP
	bool "Disable 32 BPP"
	default y
	---help---
		NX supports a variety of pixel depths.  You can save some memory by disabling
		support for unused color depths.  The selection disables support for 32BPP
		pixel depth.

endmenu

config NX_PACKEDMSFIRST
	bool "Packed MS First"
	default y
	depends on NX_DISABLE_1BPP || NX_DISABLE_2BPP || NX_DISABLE_4BPP
	---help---
		If a pixel depth of less than 8-bits is used, then NX needs to know if the
		pixels pack from the MS to LS or from LS to MS

menu "Input Devices"

config NX_MOUSE
	bool "Mouse/Touchscreen Support"
	default n
	---help---
		Build in support for mouse or touchscreeninput.

config NX_KBD
	bool "Keyboard Support"
	default n
	---help---
		Build in support of keypad/keyboard input.

endmenu

menu "Framed Window Borders"

config NXTK_BORDERWIDTH
	int "Border Width"
	default 4
	---help---
		Specifies with with of the border (in pixels) used with framed windows.
		The default is 4.

config NXTK_DEFAULT_BORDERCOLORS
	bool "Use Default Border Colors"
	default y
	---help---
		If this option is defined, the default system border colors will be
		used on framed windows.  Otherwise, additional options will be
		present so that you can define custom board colors.

if !NXTK_DEFAULT_BORDERCOLORS

config NXTK_BORDERCOLOR1
	hex "Border Color"
	default 0x0
	---help---
		Specify the colors of the border used with framed windows.
		NXTL_BORDERCOLOR1 is the "normal" color of the border.
		NXTK_BORDERCOLOR2 is the shadow side color and so is normally darker.
		NXTK_BORDERCOLOR3 is the shiny side color and so is normally brighter.

config NXTK_BORDERCOLOR2
	hex "Darker Border Color"
	default 0x0
	---help---
		Specify the colors of the border used with framed windows.
		NXTL_BORDERCOLOR1 is the "normal" color of the border.
		NXTK_BORDERCOLOR2 is the shadow side color and so is normally darker.
		NXTK_BORDERCOLOR3 is the shiny side color and so is normally brighter.

config NXTK_BORDERCOLOR3
	hex "Brighter Border Color"
	default 0x0
	---help---
		Specify the colors of the border used with framed windows.
		NXTL_BORDERCOLOR1 is the "normal" color of the border.
		NXTK_BORDERCOLOR2 is the shadow side color and so is normally darker.
		NXTK_BORDERCOLOR3 is the shiny side color and so is normally brighter.

endif # !NXTK_DEFAULT_BORDERCOLORS
endmenu

config NXTK_AUTORAISE
	bool "Autoraise"
	default n
	---help---
		If set, a window will be raised to the top if the mouse position is over a
		visible portion of the window.  Default: A mouse button must be clicked over
		a visible portion of the window.

menu "Font Selections"

config NXFONTS_CHARBITS
	int "Bits in Character Set"
	default 7
	range 7 8
	---help---
		The number of bits in the character set.  Current options are only 7 and 8.
		The default is 7.

config NXFONT_MONO5X8
	bool "Mono 5x8"
	default n
	---help---
	Tiny mono-spaced 5x8 font (font ID FONTID_MONO5X8 = 18)

config NXFONT_SANS17X22
	bool "Sans 17x22"
	default n
	---help---
		This option enables support for a tiny, 17x22 san serif font
		(font ID FONTID_SANS17X22 == 14).

config NXFONT_SANS20X26
	bool "Sans 20x26"
	default n
	---help---
		This option enables support for a tiny, 20x26 san serif font
		(font ID FONTID_SANS20X26 == 15).

config NXFONT_SANS23X27
	bool "Sans 23x27"
	default n
	---help---
		This option enables support for a tiny, 23x27 san serif font
		(font ID FONTID_SANS23X27 == 1).

config NXFONT_SANS22X29
	bool "Sans 22x29"
	default n
	---help---
		This option enables support for a small, 22x29 san serif font
		(font ID FONTID_SANS22X29 == 2).

config NXFONT_SANS28X37
	bool "Sans 28x37"
	default n
	---help---
		This option enables support for a medium, 28x37 san serif font
		(font ID FONTID_SANS28X37 == 3).

config NXFONT_SANS39X48
	bool "Sans 39x48"
	default n
	---help---
		This option enables support for a large, 39x48 san serif font
		(font ID FONTID_SANS39X48 == 4).

config NXFONT_SANS17X23B
	bool "Sans 17x23 Bold"
	default n
	---help---
		This option enables support for a tiny, 17x23 san serif bold font
		(font ID FONTID_SANS17X23B == 16).

config NXFONT_SANS20X27B
	bool "Sans 20x27 Bold"
	default n
	---help---
		This option enables support for a tiny, 20x27 san serif bold font
		(font ID FONTID_SANS20X27B == 17).

config NXFONT_SANS22X29B
	bool "Sans 22x29 Bold"
	default n
	---help---
		This option enables support for a small, 22x29 san serif bold font
		(font ID FONTID_SANS22X29B == 5).

config NXFONT_SANS28X37B
	bool "Sans 28x37 Bold"
	default n
	---help---
		This option enables support for a medium, 28x37 san serif bold font
		(font ID FONTID_SANS28X37B == 6).

config NXFONT_SANS40X49B
	bool "Sans 40x49 Bold"
	default n
	---help---
		This option enables support for a large, 40x49 san serif bold font
		(font ID FONTID_SANS40X49B == 7).

config NXFONT_SERIF22X29
	bool "Serif 22x29"
	default n
	---help---
		This option enables support for a small, 22x29 font (with serifs)
		(font ID FONTID_SERIF22X29 == 8).

config NXFONT_SERIF29X37
	bool "Serif 29x37"
	default n
	---help---
		This option enables support for a medium, 29x37 font (with serifs)
		(font ID FONTID_SERIF29X37 == 9).

config NXFONT_SERIF38X48
	bool "Serif 38x48"
	default n
	---help---
		This option enables support for a large, 38x48 font (with serifs)
		(font ID FONTID_SERIF38X48 == 10).

config NXFONT_SERIF22X28B
	bool "Serif 22x28 Bold"
	default n
	---help---
		This option enables support for a small, 27x38 bold font (with serifs)
		(font ID FONTID_SERIF22X28B == 11).

config NXFONT_SERIF27X38B
	bool "Serif 27x38 Bold"
	default n
	---help---
		This option enables support for a medium, 27x38 bold font (with serifs)
		(font ID FONTID_SERIF27X38B == 12).

config NXFONT_SERIF38X49B
	bool "Serif 38x49 Bold"
	default n
	---help---
		This option enables support for a large, 38x49 bold font (with serifs)
		(font ID FONTID_SERIF38X49B == 13).

endmenu

menuconfig NXCONSOLE
	bool "NxConsole"
	default n
	---help---
		Enables building of the NxConsole driver.

if NXCONSOLE

comment "NxConsole Output Text/Graphics Options"

config NXCONSOLE_BPP
	int "NxConsole BPP"
	default 1 if !NX_DISABLE_1BPP
	default 2 if !NX_DISABLE_2BPP
	default 4 if !NX_DISABLE_4BPP
	default 8 if !NX_DISABLE_8BPP
	default 16 if !NX_DISABLE_16BPP
	default 24 if !NX_DISABLE_24BPP
	default 32 if !NX_DISABLE_32BPP
	---help---
		Currently, NxConsole supports only a single pixel depth. This
		configuration setting must be provided to support that single pixel depth.
		Default: The smallest enabled pixel depth. (see NX_DISABLE_*BPP)

config NXCONSOLE_CURSORCHAR
	int "Character code to use as the cursor"
	default 137
	---help---
		The bitmap code to use as the cursor.  Default '_' (137)

config NXCONSOLE_MXCHARS
	int "Max Characters on Display"
	default 128
	---help---
		NxConsole needs to remember every character written to the console so
		that it can redraw the window. This setting determines the size of some
		internal memory allocations used to hold the character data. Default: 128.

config NXCONSOLE_CACHESIZE
	int "Font Cache Size"
	default 16
	---help---
		NxConsole supports caching of rendered fonts. This font caching is required
		for two reasons: (1) First, it improves text performance, but more
		importantly (2) it preserves the font memory. Since the NX server runs on
		a separate server thread, it requires that the rendered font memory persist
		until the server has a chance to render the font. Unfortunately, the font
		cache would be quite large if all fonts were saved. The NXCONSOLE_CACHESIZE
		setting will control the size of the font cache (in number of glyphs). Only that
		number of the most recently used glyphs will be retained. Default: 16.
		NOTE: There can still be a race condition between the NxConsole driver and the
		NX task.  If you every see character corruption (especially when printing
		a lot of data or scrolling), then increasing the value of NXCONSOLE_CACHESIZE
		is something that you should try.  Alternatively, you can reduce the size of
		MQ_MAXMSGSIZE which will force NxConsole task to pace the server task.
		NXCONSOLE_CACHESIZE should be larger than MQ_MAXMSGSIZE in any event.

config NXCONSOLE_LINESEPARATION
	int "Line Separation"
	default 0
	---help---
		This the space (in rows) between each row of test.  Default: 0

config NXCONSOLE_NOWRAP
	bool "No wrap"
	default n
	---help---
		By default, lines will wrap when the test reaches the right hand side
		of the window. This setting can be defining to change this behavior so
		that the text is simply truncated until a new line is  encountered.

comment "NxConsole Input options"

config NXCONSOLE_NXKBDIN
	bool "NX KBD input"
	default n
	---help---
		Take input from the NX keyboard input callback.  By default, keyboard
		input is taken from stdin (/dev/console).  If this option is set, then
		the interface nxcon_kdbin() is enabled.  That interface may be driven
		by window callback functions so that keyboard input *only* goes to the
		top window.

config NXCONSOLE_KBDBUFSIZE
	int "Keyboard Input Buffer Size"
	default 16
	---help---
		If NXCONSOLE_NXKBDIN is enabled, then this value may be used to
		define the size of the per-window keyboard input buffer.  Default: 16

config NXCONSOLE_NPOLLWAITERS
	int "Number of Poll Waiters"
	default 4
	---help---
		The number of threads that can be waiting for read data available.
		Default: 4

endif # NXCONSOLE

comment "NX Multi-user only options"

menuconfig NX_MULTIUSER
	bool "Multi-user NX Server"
	default n
	---help---
		Configures NX in multi-user mode

if NX_MULTIUSER

config NX_BLOCKING
	bool "Blocking"
	default n
	---help---
		Open the client message queues in blocking mode.  In this case,
		nx_eventhandler() will not return until a message is received and processed.

config NX_MXSERVERMSGS
	int "Max Server Messages"
	default 32
	---help---
		Specifies the maximum number of messages that can fit in the message queues.
		No additional resources are allocated, but this can be set to prevent
		flooding of the client or server with too many messages (PREALLOC_MQ_MSGS
		controls how many messages are pre-allocated).

config NX_MXCLIENTMSGS
	int "Max Client Messages"
	default 16
	---help---
		Specifies the maximum number of messages that can fit in the message queues.
		No additional resources are allocated, but this can be set to prevent
		flooding of the client or server with too many messages (PREALLOC_MQ_MSGS
		controls how many messages are pre-allocated).

config NX_NXSTART
	bool "nx_start()"
	default n
	---help---
		If this option is selected, then the nx_start() interface will be
		built.  The nx_start() interface provides a single call to initialize
		and start the NX server.

if NX_NXSTART

config NXSTART_EXTERNINIT
	bool "External display Initialization"
	default n
	---help---
		Define to support external display initialization by platform-
		specific code.  This this option is defined, then nx_start() will
		call up_nxdrvinit(CONFIG_NXSTART_DEVNO) to initialize the graphics
		device.  This option is necessary if display is used that cannot be
		initialized using the standard LCD or framebuffer interfaces.

config NXSTART_SERVERPRIO
	int "NX Server priority"
	default 110
	---help---
		Priority of the NX server.  This applies only if NX is configured in
		multi-user mode (NX_MULTIUSER=y).  Default: 110.

		NOTE:  NXSTART_SERVERPRIO should have a relatively high priority to
		avoid data overrun race conditions.

config NXSTART_SERVERSTACK
	int "NX Server Stack Size"
	default 2048
	---help---
		NX server thread stack size (in multi-user mode).  Default 2048

config NXSTART_DEVNO
	int "LCD Device Number"
	default 0
	depends on NX_LCDDRIVER || NXSTART_EXTERNINIT
	---help---
		LCD device number (in case there are more than one LCDs connected).
		Default: 0

config NXSTART_VPLANE
	int "Plane Number"
	default 0
	depends on !NX_LCDDRIVER && !NXSTART_EXTERNINIT
	---help---
		Only a single video plane is supported. Default: 0

endif # NX_NXSTART
endif # NX_MULTIUSER
endif # NX