X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/1a9e7b0fc69ea363700b9ff37865caebdec2ce52..7c28d4d63c2ccd9945d1b0bb11dd3caff4c382b3:/embedded/app/usbcan/can_lpcbusemu.c diff --git a/embedded/app/usbcan/can_lpcbusemu.c b/embedded/app/usbcan/can_lpcbusemu.c index fc94599..2c15749 100644 --- a/embedded/app/usbcan/can_lpcbusemu.c +++ b/embedded/app/usbcan/can_lpcbusemu.c @@ -11,6 +11,19 @@ See documentation for details. #include "can/can.h" + +/*********************************************************************** + * Microsecond delay routine + ***********************************************************************/ +void udelay(long time) +{ + volatile long ticks=(time * CCLK) / 2000000; + do{ + ticks--; + } while(ticks>0); +} + + inline void can_data_pins_dir_output(void) { IO1DIR|=P1_SJA1000_DATA_PINS; // Port as output to send data