zephyr/drivers/can/Kconfig.loopback
Alexander Wachter 79ed6a7e53 drivers: can: loopback: Use thread to send frames.
The loopback driver is a simple driver that can be used to
test CAN subsystems. The actual implementation sends frames
in the same thread that calls the send function.
Some libraries have problems with that behavior.
This PR implements a dedicated thread that calls the callback
for the receiving functions and a msgq in between the sender
and the TX thread.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-03-12 16:10:09 +02:00

53 lines
1.3 KiB
Plaintext

# CAN loopback device configuration options
# Copyright (c) 2019 Alexander Wachter
# SPDX-License-Identifier: Apache-2.0
config CAN_LOOPBACK
bool "Loopback CAN driver"
help
This is a dummy driver that can only loopback messages.
if CAN_LOOPBACK
config CAN_LOOPBACK_DEV_NAME
string "CAN loopback device name"
default "CAN_LOOPBACK"
help
"Device name for the loopback device"
config CAN_MAX_FILTER
int "Maximum number of concurrent active filters"
default 16
range 1 1024
help
Defines the array size of the filters.
Must be at least the size of concurrent reads.
config CAN_LOOPBACK_TX_THREAD_STACK_SIZE
int "TX thread stack size"
default 256
help
Stack size of the TX thread.
The TX thread calls the callbacks of the receiver
if the filter matches.
config CAN_LOOPBACK_TX_THREAD_PRIORITY
int "TX thread priority"
default 2
help
Priority of the TX thread.
The TX thread calls the callbacks of the receiver
if the filter matches.
config CAN_LOOPBACK_TX_MSGQ_SIZE
int "TX message queue size"
default 16
help
Number of TX frames that can be buffered.
The send functions puts frame int this queue and TX thread takes the
messages from this msgq and calls the respective receiver if the
filter matches.
endif # CAN_LOOPBACK