forked from Imagelibrary/rtems
cpukit: add support for common CAN/CAN FD stack
This adds support for common full-featured CAN/CAN FD stack to RTEMS. The API is provided in form the form of the POSIX character driver with each CAN controller (chip) registered as node into “/dev” namespace. The stack utilizes FIFO queues (also called edges) organized into oriented edges between controller side and application side. Edges, responsible for message transfers from application to controller and vice versa, can have different priorities and function as priority classes. The stack provides run time configuration options to create new queues with desired priority, direction and filter, making it suitable for various applications requirements. There is also a possibility to configure controller’s characteristics (bit rate, mode, chip specific ioctl calls). Both blocking and nonblocking mode is supported. Signed-off-by: Michal Lenc <michallenc@seznam.cz> Co-authored-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
This commit is contained in:
committed by
Gedare Bloom
parent
cc4123136b
commit
c3f4e215b1
@@ -33,6 +33,10 @@ links:
|
||||
uid: optboothartid
|
||||
- role: build-dependency
|
||||
uid: optbuildlabel
|
||||
- role: build-dependency
|
||||
uid: optcanfifosize
|
||||
- role: build-dependency
|
||||
uid: optcanqueueprios
|
||||
- role: build-dependency
|
||||
uid: optdebug
|
||||
- role: build-dependency
|
||||
|
||||
@@ -35,6 +35,18 @@ install:
|
||||
- destination: ${BSP_INCLUDEDIR}/arpa
|
||||
source:
|
||||
- cpukit/include/arpa/ftp.h
|
||||
- destination: ${BSP_INCLUDEDIR}/dev/can
|
||||
source:
|
||||
- cpukit/include/dev/can/can-bittiming.h
|
||||
- cpukit/include/dev/can/can-bus.h
|
||||
- cpukit/include/dev/can/can-devcommon.h
|
||||
- cpukit/include/dev/can/can-filter.h
|
||||
- cpukit/include/dev/can/can-frame.h
|
||||
- cpukit/include/dev/can/can-helpers.h
|
||||
- cpukit/include/dev/can/can-impl.h
|
||||
- cpukit/include/dev/can/can-queue.h
|
||||
- cpukit/include/dev/can/can-stats.h
|
||||
- cpukit/include/dev/can/can.h
|
||||
- destination: ${BSP_INCLUDEDIR}/dev/i2c
|
||||
source:
|
||||
- cpukit/include/dev/i2c/eeprom.h
|
||||
@@ -531,6 +543,11 @@ source:
|
||||
- cpukit/crc/crc24q.c
|
||||
- cpukit/base64/base64-encode.c
|
||||
- cpukit/base64/base64-decode.c
|
||||
- cpukit/dev/can/can-bittiming.c
|
||||
- cpukit/dev/can/can-bus.c
|
||||
- cpukit/dev/can/can-devcommon.c
|
||||
- cpukit/dev/can/can-quekern.c
|
||||
- cpukit/dev/can/can-queue.c
|
||||
- cpukit/dev/flash/flashdev.c
|
||||
- cpukit/dev/i2c/eeprom.c
|
||||
- cpukit/dev/i2c/fpga-i2c-slave.c
|
||||
|
||||
17
spec/build/cpukit/optcanfifosize.yml
Normal file
17
spec/build/cpukit/optcanfifosize.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
SPDX-License-Identifier: BSD-2-Clause OR Apache-2.0 OR GPL-2.0-or-later
|
||||
actions:
|
||||
- get-integer: null
|
||||
- define: null
|
||||
build-type: option
|
||||
copyrights:
|
||||
- Copyright (C) 2023-2024 Michal Lenc <michallenc@seznam.cz>
|
||||
default:
|
||||
- enabled-by: true
|
||||
value: 64
|
||||
description: |
|
||||
Default size in CAN frames of FIFO queues.
|
||||
enabled-by: true
|
||||
format: '{}'
|
||||
links: []
|
||||
name: RTEMS_CAN_FIFO_SIZE
|
||||
type: build
|
||||
17
spec/build/cpukit/optcanqueueprios.yml
Normal file
17
spec/build/cpukit/optcanqueueprios.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
SPDX-License-Identifier: BSD-2-Clause OR Apache-2.0 OR GPL-2.0-or-later
|
||||
actions:
|
||||
- get-integer: null
|
||||
- define: null
|
||||
build-type: option
|
||||
copyrights:
|
||||
- Copyright (C) 2023-2024 Michal Lenc <michallenc@seznam.cz>
|
||||
default:
|
||||
- enabled-by: true
|
||||
value: 3
|
||||
description: |
|
||||
Number of available priorities for CAN priority queues.
|
||||
enabled-by: true
|
||||
format: '{}'
|
||||
links: []
|
||||
name: RTEMS_CAN_QUEUE_PRIO_NR
|
||||
type: build
|
||||
Reference in New Issue
Block a user