#include <types.h>#include <limits.h>
Defines | |
| #define | MAX_TSEG1 15 |
| #define | MAX_TSEG2 7 |
Functions | |
| int | lpcan_btr (uint32_t *btr, int rate, int clock, int sjw, int sampl_pt, int sam) |
| #define MAX_TSEG1 15 |
| #define MAX_TSEG2 7 |
| int lpcan_btr | ( | uint32_t * | btr, | |
| int | rate, | |||
| int | clock, | |||
| int | sjw, | |||
| int | sampl_pt, | |||
| int | sam | |||
| ) |
| btr | pointer to resulting BTR bit timing register value | |
| rate | bit rate [bit/s] | |
| clock | peripheral bus clock frequency [Hz] | |
| sjw | Synchronization Jump Width (0..3) | |
| sampl_pt | sampling point position 0<sampl_pt<100 [%] | |
| sam | 0 for bus being sampled once, 1 for bus being sampled 3x |
Calculate the bit timing register (BTR) value according to given frequency and sampling specification.

1.7.1