6 #define BAUDRATE_TOLERANCE_PERCENT 1
7 #define SAMPLEPOINT_TOLERANCE_PERCENT 5
8 #define SAMPLEPOINT_UPPER_LIMIT 88
23 typedef union C0CONR
{
25 struct FIELD_C0CONR bc0con
;
27 typedef union C1CONR
{
29 struct FIELD_C1CONR bc1con
;
32 #define SJA_TSEG1 ((pParams->btr1 & 0x0f)+1)
33 #define SJA_TSEG2 (((pParams->btr1 & 0x70)>>4)+1)
34 #define SJA_BRP ((pParams->btr0 & 0x3f)+1)
35 #define SJA_SJW ((pParams->btr0 & 0xc0)>>6)
36 #define SJA_SAM ((pParams->btr1 & 0x80)>>7)
37 int baudrate_m16c(int clk
, int brp
, int pr
, int ph1
, int ph2
);
38 int samplepoint_m16c(int brp
, int pr
, int ph1
, int ph2
);
39 int SJA1000_TO_M16C_BASIC_Params(CPC_MSG_T
*pMsg
);