]> rtime.felk.cvut.cz Git - lincan.git/blob - embedded/app/usbcan/can/can_bittiming.h
lpc17xx embedded: new function for obtaining chip bittiming constant parameters.
[lincan.git] / embedded / app / usbcan / can / can_bittiming.h
1 #ifndef _CAN_BITTIMING_H
2 #define _CAN_BITTIMING_H
3
4 #include "./can_sysdep.h"
5
6 /*
7  * CAN harware-dependent bit-timing constant
8  *
9  * Used for calculating and checking bit-timing parameters
10  */
11
12 struct can_bittiming_const {
13         char name[16];          /* Name of the CAN controller hardware */
14         uint32_t tseg1_min;        /* Time segement 1 = prop_seg + phase_seg1 */
15         uint32_t tseg1_max;
16         uint32_t tseg2_min;        /* Time segement 2 = phase_seg2 */
17         uint32_t tseg2_max;
18         uint32_t sjw_max;          /* Synchronisation jump width */
19         uint32_t brp_min;          /* Bit-rate prescaler */
20         uint32_t brp_max;
21         uint32_t brp_inc;
22 };
23
24 #endif /*_CAN_BITTIMING_H*/