![]() |
RTEMS 7.0-rc1
|
This file is part of CAN/CAN FD bus common support and implements common IO operations. More...
#include <rtems/imfs.h>#include <rtems/malloc.h>#include <rtems/timespec.h>#include <rtems/score/basedefs.h>#include <dev/can/can-helpers.h>#include <dev/can/can-devcommon.h>#include <dev/can/can.h>#include <stdlib.h>#include <string.h>Functions | |
| int | rtems_can_bus_notify_chip_stop (struct rtems_can_chip *chip) |
| This function notifies all users the chip was stopped. | |
| int | rtems_can_bus_register (struct rtems_can_bus *bus, const char *bus_path) |
| This function registers CAN device into /dev namespace. | |
This file is part of CAN/CAN FD bus common support and implements common IO operations.
Implementation is based on original LinCAN - Linux CAN bus driver Part of OrtCAN project https://ortcan.sourceforge.net/
| int rtems_can_bus_notify_chip_stop | ( | struct rtems_can_chip * | chip | ) |
This function notifies all users the chip was stopped.
This should be called from the chip's stop function once all frames are either aborted or flushed from the FIFOs. It basically unblocks users waiting on a blocking read.
| chip | Pointer to rtems_can_chip structure. |
| int rtems_can_bus_register | ( | struct rtems_can_bus * | bus, |
| const char * | bus_path | ||
| ) |
This function registers CAN device into /dev namespace.
This should be called with already allocated rtems_can_bus structure and initialized controller to be registered.
| bus | Pointer to rtems_can_bus structure. |
| bus_path | Entire path to which the device should be registered (i.e /dev/can0, /dev/my_can etc.). |