sja1000p_baud_rate

Name

sja1000p_baud_rate --  set communication parameters.

Synopsis

int sja1000p_baud_rate (struct chip_t * chip, int rate, int clock, int sjw, int sampl_pt, int flags);

Arguments

chip

pointer to chip state structure

rate

baud rate in Hz

clock

frequency of sja1000 clock in Hz (ISA osc is 14318000)

sjw

synchronization jump width (0-3) prescaled clock cycles

sampl_pt

sample point in % (0-100) sets (TSEG1+1)/(TSEG1+TSEG2+2) ratio

flags

fields BTR1_SAM, OCMODE, OCPOL, OCTP, OCTN, CLK_OFF, CBP

Return Value

negative value reports error.

File

src/sja1000p.c