RTEMS CAN/CAN FD Stack
Loading...
Searching...
No Matches
Classes | Functions
can-bus.h File Reference

This header file is part of CAN/CAN FD bus common support. It declares structures and functions used for CAN bus registration. More...

#include <rtems.h>
#include <stdint.h>
#include <stdatomic.h>
#include <sys/ioccom.h>
#include <rtems/thread.h>
Include dependency graph for can-bus.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  can_bus
 This structure represents CAN bus device. This is the main structure passed throught file system during read/write/ioctl/close operations. More...
 

Functions

int can_bus_register (struct can_bus *bus, const char *bus_path)
 This function registeres CAN device into /dev namespace.
 

Detailed Description

This header file is part of CAN/CAN FD bus common support. It declares structures and functions used for CAN bus registration.

Function Documentation

◆ can_bus_register()

int can_bus_register ( struct can_bus bus,
const char *  bus_path 
)

This function registeres CAN device into /dev namespace.

This should be called with already allocated can_bus structure and initialized controller to be registered.

Parameters
busPointer to can_bus structure.
bus_pathEntire path to which the device should be registered (i.e /dev/can0, /dev/my_can etc.).
Returns
Zero on success, negative value on error.