1+ menuconfig PKG_USING_ISO14229
2+ bool "Enable iso14229 (UDS) library"
3+ default n
4+ help
5+ ISO14229-1 (UDS) library for RT-Thread.
6+ This library provides a platform-agnostic UDS client and server implementation
7+ with an RT-Thread porting layer (iso14229_rtt.c).
8+
9+ if PKG_USING_ISO14229
10+
11+ menu "Logging Configuration"
12+ config UDS_LOG_LEVEL
13+ int "Log level"
14+ range 0 5
15+ default 3
16+ help
17+ Set the log level for the UDS library.
18+ 0: No log output
19+ 1: Errors only
20+ 2: Warnings and errors
21+ 3: Info, warnings, and errors
22+ 4: Debug, info, warnings, and errors
23+ 5: Verbose, debug, info, warnings, and errors
24+
25+ config UDS_RTTHREAD_ULOG_ENABLED
26+ bool "Use ULOG for logging"
27+ default y
28+ depends on RT_USING_ULOG
29+ help
30+ If enabled, the library will use RT-Thread's ULOG component.
31+ Otherwise, it will fall back to rt_kprintf.
32+
33+ config UDS_CONFIG_LOG_COLORS
34+ bool "Enable colorized log output (when not using ULOG)"
35+ default y
36+ depends on !UDS_RTTHREAD_ULOG_ENABLED
37+ help
38+ Enables ANSI color codes in the log output.
39+
40+ config UDS_RTTHREAD_LOG_BUFFER_SIZE
41+ int "Buffer size for a single log message (if not using ULOG)"
42+ default 256
43+ depends on !UDS_RTTHREAD_ULOG_ENABLED
44+ endmenu
45+
46+ config UDS_RTT_EVENT_TABLE_SIZE
47+ int "Event Dispatch Table Size"
48+ default 32
49+ help
50+ Specifies the size of the internal lookup table for UDS events.
51+ This value acts as the array size for O(1) event dispatching.
52+
53+ IMPORTANT: This value MUST be greater than the maximum value of the
54+ UDSEvent_t enum (UDS_EVT_MAX).
55+
56+ If the UDS library defines ~28 events, a value of 32 is safe.
57+ If you encounter "Event ID out of range" errors, increase this value.
58+
59+ config UDS_USING_EXAMPLE
60+ bool "Enable UDS server example application"
61+ default n
62+ help
63+ This option compiles the 'examples' directory (app_uds_example.c),
64+ which provides 'uds_example start' and 'uds_example stop' MSH commands.
65+
66+ It demonstrates how to create a UDS instance, register a service (0x2E),
67+ and bind it to a CAN device.
68+
69+ if UDS_USING_EXAMPLE
70+ menu "UDS Server Example Configuration"
71+ config UDS_EXAMPLE_LED_CTRL_DID
72+ hex "DID for LED control"
73+ default 0x0001
74+ help
75+ The Data Identifier (DID) used in the example to control LEDs (Service 0x2E).
76+
77+ config UDS_EXAMPLE_PIN_LED_R
78+ int "GPIO Pin for Red LED"
79+ default -1
80+ help
81+ Set the GPIO pin number for the Red LED. -1 to disable.
82+
83+ config UDS_EXAMPLE_PIN_LED_G
84+ int "GPIO Pin for Green LED"
85+ default -1
86+
87+ config UDS_EXAMPLE_PIN_LED_B
88+ int "GPIO Pin for Blue LED"
89+ default -1
90+ endmenu
91+ endif
92+
93+ endif
0 commit comments