ifeq ($(MACH),lpc17xx)
usbcan_SOURCES += lpc17xx_can.c
else #MACH
-#usbcan_SOURCES += can_lpcbusemu.c ul_usb1.c
+usbcan_SOURCES += can_lpcbusemu.c ul_usb1.c
endif #MACH
#usbtest_SOURCES += ul_idstr.c
#lib_LOADLIBES = bspbase ul_drv lpciap keyval lpciap_kvpb mach_hal uldy
lib_LOADLIBES = bspbase usbbase usbmore lpcusb mach_hal
usbcan_MOREOBJS = $(USER_LIB_DIR)/system_stub.o
-# $(USER_LIB_DIR)/ivt.o
nobase_include_HEADERS = usb/usb_defs.h
-#link_VARIANTS = app boot
+ifeq ($(MACH),lpc21xx)
+link_VARIANTS = app boot
+usbcan_MOREOBJS += $(USER_LIB_DIR)/ivt.o
+endif
endif #CONFIG_ULBOOT
#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
#include "./usb/usb_vend.h"
extern int can_lmc1_register(struct hwspecops_t *hwspecops);
+extern int ul_usb1_register(struct hwspecops_t *hwspecops);
#define MASK_EP1RX 0x01
#define MASK_EP1TX 0x02
}
}
-/***********************************************************************
- * Microsecond delay routine
- ***********************************************************************/
-/*
-void udelay(long time)
-{
- volatile long ticks=(time * CCLK) / 2000000;
- do{
- ticks--;
- } while(ticks>0);
-}
-*/
-
/***********************************************************************
* Routine for visible LED blinking (on USB transmission)
***********************************************************************/
- // DEBUG
- //ul_usb1_register(candev->hwspecops); //(defined in ul_usb1.c)
- // register for another board:
- can_lmc1_register(candev->hwspecops);
+ ul_usb1_register(candev->hwspecops);
+// can_lmc1_register(candev->hwspecops);