Definitions of CAN device interface. More...
Definitions of CAN device interface.
Definition in file device.h.
Go to the source code of this file.
Data Structures | |
struct | candev_params |
Parameters to initialize a candev. More... | |
struct | candev_dev |
candev descriptor to pass to the device thread More... | |
#define | CAN_MAX_RATE_ERROR (50) /* 5 % */ |
Maximum bit-rate error allowed when computing bittimings in tenth of percent. | |
#define | CAN_DLL_NUMOF (1) |
Maximum number of interfaces which can be registered on DLL. | |
typedef struct candev_params | candev_params_t |
Parameters to initialize a candev. | |
typedef struct candev_dev | candev_dev_t |
candev descriptor to pass to the device thread | |
kernel_pid_t | can_device_init (char *stack, int stacksize, char priority, const char *name, candev_dev_t *params) |
Initialize a CAN device thread. More... | |
int | can_device_calc_bittiming (uint32_t clock, const struct can_bittiming_const *timing_const, struct can_bittiming *bittiming) |
Fill in a bittiming structure from bittiming->bitrate and timing_const . More... | |
int can_device_calc_bittiming | ( | uint32_t | clock, |
const struct can_bittiming_const * | timing_const, | ||
struct can_bittiming * | bittiming | ||
) |
Fill in a bittiming
structure from bittiming->bitrate
and timing_const
.
[in] | clock | the clock of the CAN controller |
[in] | timing_const | the timing parameter of the CAN controller |
[in,out] | bittiming | the calculated bittiming (bitrate field must be set) |
kernel_pid_t can_device_init | ( | char * | stack, |
int | stacksize, | ||
char | priority, | ||
const char * | name, | ||
candev_dev_t * | params | ||
) |
Initialize a CAN device thread.
This function sets up a CAN device thread
[in] | stack | the device thread stack |
[in] | stacksize | the device thread stack size |
[in] | priority | the device thread priority |
[in] | name | the device thread name |
[in] | params | the parameters containing the device pointer and the ifnum |