1+ menuconfig PKG_USING_ISOTP_C
2+ bool "ISO-TP:ISO 15765-2 (also known as ISO-TP) protocol with CAN multi-link and event-driven support"
3+ default n
4+ select RT_USING_HEAP
5+ select RT_USING_CAN
6+ help
7+ A C library that implements the ISO 15765-2 (also known as ISO-TP) protocol.
8+ This package provides an adapter layer for RT-Thread with multi-link and event-driven support.
9+
10+ if PKG_USING_ISOTP_C
11+
12+ menu "Adapter Layer Configuration"
13+ config PKG_ISOTP_C_POLL_THREAD_STACK_SIZE
14+ int "Stack size for the isotp-c polling thread"
15+ default 1024
16+ help
17+ This thread periodically calls isotp_poll() for all active links.
18+
19+ config PKG_ISOTP_C_POLL_THREAD_PRIORITY
20+ int "Priority for the isotp-c polling thread"
21+ default 20
22+ help
23+ Priority of the polling thread.
24+
25+ config PKG_ISOTP_C_POLL_INTERVAL_MS
26+ int "Polling interval in milliseconds"
27+ default 5
28+ help
29+ The interval at which the polling thread runs to update link states.
30+ A smaller value gives faster response but higher CPU usage.
31+ endmenu
32+
33+ menu "ISO-TP Protocol Parameters"
34+ config ISO_TP_DEFAULT_BLOCK_SIZE
35+ int "Block Size (BS)"
36+ default 8
37+ help
38+ ISO-TP Block Size (BS). Max number of consecutive frames the receiver
39+ can receive without sending a new Flow Control frame. (0 = infinite)
40+
41+ config ISO_TP_DEFAULT_ST_MIN_US
42+ int "Minimum Separation Time (STmin) in microseconds"
43+ default 0
44+ help
45+ ISO-TP Separation Time (STmin). Specifies the minimum time gap
46+ allowed between the transmission of consecutive frames.
47+
48+ config ISO_TP_MAX_WFT_NUMBER
49+ int "Max number of Wait Frame Transmissions (WFTmax)"
50+ default 1
51+ help
52+ ISO-TP WFTmax. Indicates how many Wait Frames (FC.WT) can be
53+ transmitted by the receiver in a row if it's not ready to receive.
54+
55+ config ISO_TP_DEFAULT_RESPONSE_TIMEOUT_US
56+ int "Response timeout in microseconds (Ar/As, Br/Bs, Cr/Cs)"
57+ default 100000
58+ help
59+ Default timeout for waiting for a response during a multi-frame
60+ send or receive (e.g., waiting for a Flow Control frame).
61+
62+ config ISO_TP_FRAME_PADDING
63+ bool "Enable CAN frame padding"
64+ default n
65+ help
66+ If enabled, all transmitted CAN frames will be padded to 8 bytes.
67+ This is required by some ECUs.
68+
69+ if ISO_TP_FRAME_PADDING
70+ config ISO_TP_FRAME_PADDING_VALUE
71+ hex "Padding value"
72+ default 0xAA
73+ help
74+ The byte value used for padding CAN frames if padding is enabled.
75+ endif
76+
77+ # The following options are mandatory for the event-driven adapter
78+ config ISO_TP_USER_SEND_CAN_ARG
79+ bool "Enable user argument for send_can function"
80+ default y
81+ help
82+ Adds a 'void *user_send_can_arg' to isotp_user_send_can.
83+ This is ESSENTIAL for multi-link/multi-CAN support. DO NOT DISABLE.
84+
85+ config ISO_TP_TRANSMIT_COMPLETE_CALLBACK
86+ bool "Enable transmit complete callback"
87+ default y
88+ help
89+ Enables the isotp_set_tx_done_cb function.
90+ This is ESSENTIAL for the event-driven adapter. DO NOT DISABLE.
91+
92+ config ISO_TP_RECEIVE_COMPLETE_CALLBACK
93+ bool "Enable receive complete callback"
94+ default y
95+ help
96+ Enables the isotp_set_rx_done_cb function.
97+ This is ESSENTIAL for the event-driven adapter. DO NOT DISABLE.
98+ endmenu
99+
100+ config PKG_ISOTP_C_EXAMPLES
101+ bool "Enable isotp-c examples"
102+ default n
103+ select BSP_USING_CAN1
104+ select BSP_USING_CAN2
105+ help
106+ Enable examples for isotp-c package, demonstrating communication
107+ between two CAN interfaces.
108+
109+ config PKG_ISOTP_C_VERSION
110+ string "isotp-c version"
111+ default "latest"
112+
113+ endif
0 commit comments