![]() |
RTEMS 7.0-rc1
|
This header file is part of CAN/CAN FD bus common support. It declares structures and functions used for controller's side of FIFO operations. More...
#include <rtems.h>#include <stdint.h>#include <stdatomic.h>#include <sys/ioccom.h>#include <rtems/thread.h>#include <dev/can/can.h>#include <dev/can/can-bus.h>#include <dev/can/can-impl.h>Go to the source code of this file.
Data Structures | |
| struct | rtems_can_queue_ends_dev |
| This structure holds the controller's (application) side of queue's ends. More... | |
| struct | rtems_can_chip_ops |
| This structure represents CAN controller operations. These provides interface from IOCTL calls to controller functions and should be registered during controller initialization. More... | |
| struct | rtems_can_chip |
| This structure represents one CAN controller. More... | |
| struct | rtems_can_queue_ends_user_t |
| This structure holds the user's (application) side of queue's ends. More... | |
| struct | rtems_can_user |
| This structure represents one CAN user (application). More... | |
Functions | |
| TAILQ_HEAD (rtems_can_user_list_t, rtems_can_user) | |
| int | rtems_can_chip_start (struct rtems_can_chip *chip) |
| This function starts the controller. | |
| int | rtems_can_bitrate2bittiming (struct rtems_can_chip *chip, struct rtems_can_bittiming *bt, const struct rtems_can_bittiming_const *btc) |
| This function calculates CAN bit timing for given bit rate. | |
| uint64_t | rtems_can_fill_timestamp (void) |
| This function fills timestamping with current monotonic time. | |
| int | rtems_can_queue_ends_init_user (struct rtems_can_queue_ends_user_t *qends) |
| Userspace clients specific ends initialization. | |
| int | rtems_can_queue_ends_init_chip (struct rtems_can_chip *chip, const char *name) |
| This function initializes ends from chip's side. | |
This header file is part of CAN/CAN FD bus common support. It declares structures and functions used for controller's side of FIFO operations.
Implementation is based on original LinCAN - Linux CAN bus driver Part of OrtCAN project https://ortcan.sourceforge.net/
| int rtems_can_bitrate2bittiming | ( | struct rtems_can_chip * | chip, |
| struct rtems_can_bittiming * | bt, | ||
| const struct rtems_can_bittiming_const * | btc | ||
| ) |
This function calculates CAN bit timing for given bit rate.
This calculates bit timing values for given bit rate (provided in bt input argument) and controller's maximum/minimal values given by btc argument.
| chip | Pointer to rtems_can_chip structure. |
| bt | Pointer to rtems_can_bittiming structure. Calculated values are stored here. |
| btc | Pointer to rtems_can_bittiming_const structure. This provides maximum and minimal bit timing values of the controller. |
| int rtems_can_chip_start | ( | struct rtems_can_chip * | chip | ) |
This function starts the controller.
Provides common interface to start controller based on rtems_can_chip structure passed as input parameter.
| chip | Pointer to rtems_can_chip structure |
| uint64_t rtems_can_fill_timestamp | ( | void | ) |
This function fills timestamping with current monotonic time.
| int rtems_can_queue_ends_init_chip | ( | struct rtems_can_chip * | chip, |
| const char * | name | ||
| ) |
This function initializes ends from chip's side.
It should be called by CAN controller to initialize its ends.
| chip | Pointer to rtems_can_chip structure |
| name | Name of the controller's worker semaphore |
| int rtems_can_queue_ends_init_user | ( | struct rtems_can_queue_ends_user_t * | qends | ) |
Userspace clients specific ends initialization.
| qends_user | Pointer to rtems_can_queue_ends_user_t structure. |