RTEMS 7.0-rc1
Loading...
Searching...
No Matches
ctucanfd.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause OR Apache-2.0 OR GPL-2.0-or-later */
2
12/*
13* Copyright (C) 2023-2024 Michal Lenc <michallenc@seznam.cz>
14* Implementation is based on Linux CTU CAN FD driver
15* Copyright (C) 2015-2018 Ondrej Ille <ondrej.ille@gmail.com> FEE CTU
16* Copyright (C) 2018-2021 Ondrej Ille <ondrej.ille@gmail.com> self-funded
17* Copyright (C) 2018-2019 Martin Jerabek <martin.jerabek01@gmail.com> FEE CTU
18* Copyright (C) 2018-2022 Pavel Pisa <pisa@cmp.felk.cvut.cz> FEE CTU/self-funded
19*
20* Redistribution and use in source and binary forms, with or without
21* modification, are permitted provided that the following conditions
22* are met:
23* 1. Redistributions of source code must retain the above copyright
24* notice, this list of conditions and the following disclaimer.
25* 2. Redistributions in binary form must reproduce the above copyright
26* notice, this list of conditions and the following disclaimer in the
27* documentation and/or other materials provided with the distribution.
28*
29* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
33* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39* POSSIBILITY OF SUCH DAMAGE.
40*/
41
42#ifndef _DEV_CAN_CTUCANFD_H
43#define _DEV_CAN_CTUCANFD_H
44
53#define RTEMS_CTUCANFD_NTXBUFS_MAX ( 8 )
54
55struct rtems_can_chip;
56
78 uintptr_t addr,
80 rtems_task_priority worker_priority,
81 unsigned int ntxbufs,
82 rtems_option irq_option,
83 unsigned long can_clk_rate
84);
85
86#endif /* _DEV_CAN_CTUCANFD_H */
struct rtems_can_chip * rtems_ctucanfd_initialize(uintptr_t addr, rtems_vector_number irq, rtems_task_priority worker_priority, unsigned int ntxbufs, rtems_option irq_option, unsigned long can_clk_rate)
This function initializes the CTU CAN FD controller.
Definition: ctucanfd.c:1718
ISR_Vector_number rtems_vector_number
This integer type represents interrupt vector numbers.
Definition: intr.h:102
uint32_t rtems_option
This type represents a Classic API directive option set.
Definition: options.h:126
uint32_t rtems_task_priority
This integer type represents task priorities of the Classic API.
Definition: types.h:257
This structure represents one CAN controller.
Definition: can-devcommon.h:206
rtems_vector_number irq
This member holds controller's interrupt number.
Definition: can-devcommon.h:214