RTEMS 7.0-rc1
Loading...
Searching...
No Matches
can-bus.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
15/*
16 * Copyright (C) 2023-2024 Michal Lenc <michallenc@seznam.cz>
17 * Copyright (C) 2002-2009 DCE FEE CTU Prague
18 * Copyright (C) 2002-2024 Pavel Pisa <pisa@cmp.felk.cvut.cz>
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_CAN_BUS_H
43#define _DEV_CAN_CAN_BUS_H
44
45#include <rtems.h>
46#include <stdint.h>
47#include <stdatomic.h>
48#include <sys/ioccom.h>
49#include <rtems/thread.h>
50
51struct rtems_can_chip;
52
67};
68
82
96int rtems_can_bus_register( struct rtems_can_bus *bus, const char *bus_path );
97
98#endif /* _DEV_CAN_CAN_DEVCOMMON_H */
int rtems_can_bus_register(struct rtems_can_bus *bus, const char *bus_path)
This function registers CAN device into /dev namespace.
Definition: can-bus.c:816
int rtems_can_bus_notify_chip_stop(struct rtems_can_chip *chip)
This function notifies all users the chip was stopped.
Definition: can-bus.c:800
This header file defines the RTEMS Classic API.
This structure represents CAN bus device. This is the main structure passed throught file system duri...
Definition: can-bus.h:60
struct rtems_can_chip * chip
This member holds the pointer to rtems_can_chip structure. Controller specific initialization functio...
Definition: can-bus.h:66
This structure represents one CAN controller.
Definition: can-devcommon.h:206
This header file provides the API of Self-Contained Objects.