|
RTEMS CAN/CAN FD Stack
|
This header file is part of CAN/CAN FD bus common support. It implements functions and defines used to simplify controller's operations. More...
#include <rtems.h>#include <stdatomic.h>

Go to the source code of this file.
Macros | |
| #define | RTEMS_CAN_USER_MAGIC 0x05402033 |
| This define provides user magic value. It is used to check whether rtems_can_user structure was correctly initialized. | |
| #define | BIT(nr) ( 1UL << ( nr ) ) |
| #define | GENMASK(h, l) ( ( ( ~0UL ) << ( l ) ) & ( ~0UL >> ( sizeof( long ) * 8 - 1 - ( h ) ) ) ) |
| #define | __bf_shf(x) ( __builtin_ffsll( x ) - 1 ) |
| #define | FIELD_PREP(_mask, _val) ( { ( (typeof( _mask )) ( _val ) << __bf_shf( _mask ) ) & ( _mask ); } ) |
| #define | FIELD_GET(_mask, _reg) ( { (typeof( _mask )) ( ( ( _reg ) & ( _mask ) ) >> __bf_shf( _mask ) ); } ) |
This header file is part of CAN/CAN FD bus common support. It implements functions and defines used to simplify controller's operations.
Implementation is based on original LinCAN - Linux CAN bus driver Part of OrtCAN project https://ortcan.sourceforge.net/