diff -r 0d84d95790d9 -r 16c8ceea8f18 drivers/ecos_lpc2138_sja1000/build_baudrate.c --- a/drivers/ecos_lpc2138_sja1000/build_baudrate.c Tue Feb 13 17:21:19 2007 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -#include -#include - - -/* - CiA DS-301, p.20 -*/ -#define MAX_BIT_TIMING 9 -int table_bit_timing_settings[MAX_BIT_TIMING][3] = -{ - {1000, 8, 6}, /* baudrate, number of time quanta per bit, tsync+tseg1 */ - {800, 10, 8}, - {500, 16, 14}, - {250, 16, 14}, - {125, 16, 14}, - {100, 16, 14}, - { 50, 16, 14}, - { 25, 16, 14}, - { 10, 16, 14} -}; - - -void can_timing_registers(double f, int *v) -/* fill the vector v with the proper setting for TIMER 0 and TIMER 1 - regarding the clock and the baudrate */ -{ - int i; - - int BRP, TSEG1, TSEG2; - - double nominal, tq, tscl; - - double tclk = 1 / (f*1e6); /* sec */ - - for(i=0; i