nuttx/net/can/Kconfig

115 lines
3.0 KiB
Plaintext
Raw Normal View History

2020-06-15 10:23:25 +02:00
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menu "SocketCAN Support"
config NET_CAN
bool "SocketCAN support"
default n
select NET_READAHEAD
depends on NET
---help---
Enable support for SocketCAN sockets that will permit.
This logic is a WIP. Currently only fragmentary support is
available, not enough to actually do anything of consequence.
if NET_CAN
config NET_CAN_HAVE_TX_DEADLINE
bool
default n
2020-06-15 10:23:25 +02:00
config NET_CAN_HAVE_CANFD
bool
default n
2022-01-05 10:11:16 +01:00
config NET_CAN_HAVE_ERRORS
bool
default n
2020-06-15 10:23:25 +02:00
config CAN_CONNS
int "Number of CAN connections"
default 4
---help---
Maximum number of CAN connections (all tasks).
config NET_CAN_EXTID
bool "Enable CAN extended IDs"
default n
---help---
Enables support for the 29-bit extended ID in SocketCAN stack.
Default Standard 11-bit IDs.
2020-06-15 10:23:25 +02:00
config NET_CAN_CANFD
bool "Enable CAN FD support"
default y
depends on NET_CAN_HAVE_CANFD
---help---
Enable CAN FD support in SocketCAN stack
2022-01-05 10:11:16 +01:00
config NET_CAN_ERRORS
bool "Enable CAN errors support"
default n
depends on NET_CAN_HAVE_ERRORS
---help---
Enable CAN errors support in SocketCAN stack
2020-06-15 10:23:25 +02:00
config NET_CAN_SOCK_OPTS
bool "sockopt support"
default n
select NET_SOCKOPTS
select NET_CANPROTO_OPTIONS
---help---
Enable support for the CAN socket options
2020-06-15 10:23:25 +02:00
config NET_CAN_RAW_TX_DEADLINE
bool "TX deadline sockopt"
default n
depends on NET_CAN_SOCK_OPTS && NET_CAN_HAVE_TX_DEADLINE
---help---
Note: Non-standard SocketCAN sockopt, but this options helps us in
real-time use cases.
When the CAN_RAW_TX_DEADLINE sockopt is enabled. The user can send
CAN frames using sendmsg() function and add a deadline timespec
2020-06-15 10:23:25 +02:00
value in the CMSG data. When the deadline has been passed and the
CAN frame is still in the HW TX mailbox then the CAN driver will
2020-06-15 10:23:25 +02:00
discard the CAN frame automatically.
2020-06-15 10:23:25 +02:00
config NET_CAN_RAW_DEFAULT_TX_DEADLINE
int "Default TX deadline when no deadline is given (us)"
default 0
depends on NET_CAN_RAW_TX_DEADLINE
---help---
Some applications may not use the NET_CAN_RAW_TX_DEADLINE flag.
By default their deadline becomes 0 which means it becomes infinite.
This would mean that packets from applications without the
2020-06-15 10:23:25 +02:00
NET_CAN_RAW_TX_DEADLINE flag, can block the TX mailboxes forever.
This config can set the default deadline when no deadline has been
2020-06-15 10:23:25 +02:00
given.
2020-06-15 10:23:25 +02:00
config NET_CAN_RAW_FILTER_MAX
int "CAN_RAW_FILTER max filter count"
default 32
depends on NET_CAN_SOCK_OPTS
---help---
Maximum number of CAN_RAW filters that can be set per CAN connection.
2020-06-15 10:23:25 +02:00
config NET_CAN_NOTIFIER
bool "Support CAN notifications"
default n
depends on SCHED_WORKQUEUE
select WQUEUE_NOTIFIER
---help---
Enable building of CAN notifier logic that will execute a worker
function on the low priority work queue when read-ahead data
is available or when a CAN connection is lost. This is is a general
purpose notifier, but was developed specifically to support poll()
logic where the poll must wait for these events.
endif # NET_CAN
endmenu # CAN Socket Support