mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
CAN driver: Removing call to can_xmit() from can_txready() in a previous commit was a mistake. This commit restores the call to can_xmit(), but does the call in a safer environment on the work thread.
This commit is contained in:
@@ -128,6 +128,7 @@ config CAN_NPENDINGRTR
|
||||
config CAN_TXREADY
|
||||
bool "can_txready interface"
|
||||
default n
|
||||
select SCHED_WORKQUEUE
|
||||
---help---
|
||||
This selection enables the can_txready() interface. This interface
|
||||
is needed only for CAN hardware that supports queing of outgoing
|
||||
@@ -173,6 +174,22 @@ config CAN_TXREADY
|
||||
no longer full. can_txready() will then awaken the
|
||||
can_write() logic and the hang condition is avoided.
|
||||
|
||||
choice
|
||||
prompt "TX Ready Work Queue"
|
||||
default CAN_TXREADY_LOPRI if SCHED_LPWORK
|
||||
default CAN_TXREADY_HIPRI if !SCHED_LPWORK
|
||||
depends on CAN_TXREADY
|
||||
|
||||
config CAN_TXREADY_LOPRI
|
||||
bool "Low-priority work queue"
|
||||
select SCHED_LPWORK
|
||||
|
||||
config CAN_TXREADY_HIPRI
|
||||
bool "High-priority work queue"
|
||||
select SCHED_HPWORK
|
||||
|
||||
endchoice # TX Ready Work Queue
|
||||
|
||||
config CAN_LOOPBACK
|
||||
bool "CAN loopback mode"
|
||||
default n
|
||||
|
||||
Reference in New Issue
Block a user