RTEMS CAN/CAN FD Stack
Loading...
Searching...
No Matches
sja1000.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
11/*
12* Copyright (C) 2025-2026 Michal Lenc <michallenc@seznam.cz> self-funded
13* Copyright (C) 2025-2026 Pavel Pisa <pisa@cmp.felk.cvut.cz> self-funded
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_SJA1000_H
43#define _DEV_CAN_SJA1000_H
44
45struct rtems_can_chip;
46
50#define RTEMS_SJA1000_HW_REG_SPAN_MASK ( 3 )
54#define RTEMS_SJA1000_HW_REG_SPAN_1 ( 0 )
58#define RTEMS_SJA1000_HW_REG_SPAN_2 ( 1 )
62#define RTEMS_SJA1000_HW_REG_SPAN_4 ( 2 )
63
67#define RTEMS_SJA1000_HW_REG_IO_PORT ( 0x100 )
68
88 uintptr_t addr,
89 unsigned int hw_options,
90 rtems_vector_number irq,
91 rtems_task_priority worker_priority,
92 rtems_option irq_option,
93 unsigned long can_clk_rate
94);
95
96#endif /* _DEV_CAN_SJA1000_H */
struct rtems_can_chip * rtems_can_sja1000_initialize(uintptr_t addr, unsigned int hw_options, rtems_vector_number irq, rtems_task_priority worker_priority, rtems_option irq_option, unsigned long can_clk_rate)
This function initializes the SJA1000 controller.
Definition: sja1000.c:1217
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