Przeglądaj źródła

lpc1769 work with makefile

hathach 6 lat temu
rodzic
commit
8ccecde18e

+ 3 - 0
hw/bsp/lpcxpresso1769/board.mk

@@ -11,6 +11,9 @@ CFLAGS += \
 # All source paths should be relative to the top level.
 LD_FILE = hw/bsp/lpcxpresso1769/lpc1769.ld
 
+# TODO remove later
+SRC_C += src/portable/$(VENDOR)/$(CHIP_FAMILY)/hal_$(CHIP_FAMILY).c
+
 SRC_C += \
 	hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/chip_17xx_40xx.c \
 	hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/clock_17xx_40xx.c \

+ 2 - 5
hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c

@@ -71,11 +71,9 @@ static const PINMUX_GRP_T pin_usb_mux[] =
 // Invoked by startup code
 void SystemInit(void)
 {
+  Chip_IOCON_Init(LPC_IOCON);
   Chip_IOCON_SetPinMuxing(LPC_IOCON, pinmuxing, sizeof(pinmuxing) / sizeof(PINMUX_GRP_T));
   Chip_SetupXtalClocking();
-
-  /* Setup FLASH access to 4 clocks (100MHz clock) */
-//  Chip_SYSCTL_SetFLASHAccess(FLASHTIM_100MHZ_CPU);
 }
 
 void board_init(void)
@@ -123,6 +121,7 @@ void board_init(void)
 #endif
 
 	//------------- USB -------------//
+  Chip_IOCON_SetPinMuxing(LPC_IOCON, pin_usb_mux, sizeof(pin_usb_mux) / sizeof(PINMUX_GRP_T));
 	Chip_USB_Init();
 
   enum {
@@ -140,8 +139,6 @@ void board_init(void)
   // set portfunc to host !!!
   LPC_USB->StCtrl = 0x3; // should be 1
 #endif
-
-  Chip_IOCON_SetPinMuxing(LPC_IOCON, pin_usb_mux, sizeof(pin_usb_mux) / sizeof(PINMUX_GRP_T));
 }
 
 //--------------------------------------------------------------------+

+ 1 - 1
src/device/usbd.c

@@ -382,7 +382,7 @@ static bool process_control_request(uint8_t rhport, tusb_control_request_t const
         break;
 
         case TUSB_REQ_GET_DESCRIPTOR:
-          TU_ASSERT( process_get_descriptor(rhport, p_request) );
+          TU_VERIFY( process_get_descriptor(rhport, p_request) );
         break;
 
         case TUSB_REQ_SET_FEATURE: