diff options
| author | hathach <[email protected]> | 2013-06-04 10:43:58 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-06-04 10:43:58 +0700 |
| commit | cdc830782f3795cd841cd5d95fecfcad2ce06f21 (patch) | |
| tree | e212e6fca2be378b30545afbfb3654eb1c242c1e /tinyusb/device/dcd_nxp_romdriver.c | |
| parent | a3ed66344d893c2c3ba4be2319af93448d4acb9f (diff) | |
rename tusb_device_is_configured
remove dcd_lpc18xx_lpc43xx.h and dcd_lpc11uxx_lpc13xx move define to hal
Diffstat (limited to 'tinyusb/device/dcd_nxp_romdriver.c')
| -rw-r--r-- | tinyusb/device/dcd_nxp_romdriver.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tinyusb/device/dcd_nxp_romdriver.c b/tinyusb/device/dcd_nxp_romdriver.c index fb3084953..c0fcd64c0 100644 --- a/tinyusb/device/dcd_nxp_romdriver.c +++ b/tinyusb/device/dcd_nxp_romdriver.c @@ -112,15 +112,12 @@ ErrorCode_t USB_Error_Event (USBD_HANDLE_T hUsb, uint32_t param1) tusb_error_t dcd_init(void) { - uint32_t membase = (uint32_t) usb_RomDriver_buffer; - uint32_t memsize = USB_ROM_SIZE; - USBD_API_INIT_PARAM_T usb_param = { .usb_reg_base = NXP_ROMDRIVER_REG_BASE, .max_num_ep = USB_MAX_EP_NUM, - .mem_base = membase, - .mem_size = memsize, + .mem_base = (uint32_t) usb_RomDriver_buffer, + .mem_size = USB_ROM_SIZE, .USB_Configure_Event = USB_Configure_Event, .USB_Reset_Event = USB_Reset_Event, @@ -141,13 +138,13 @@ tusb_error_t dcd_init(void) ASSERT_INT(LPC_OK, ROM_API->hw->Init(&romdriver_hdl, &desc_core, &usb_param), TUSB_ERROR_FAILED); // TODO need to confirm the mem_size is reduced by the number of byte used - membase += (memsize - usb_param.mem_size); - memsize = usb_param.mem_size; +// membase += (memsize - usb_param.mem_size); +// memsize = usb_param.mem_size; return TUSB_ERROR_NONE; } -bool usb_isConfigured(void) +bool tusb_device_is_configured(void) { return usbd_info.state == TUSB_DEVICE_STATE_CONFIGURED; } |
