EasyManuals Logo

NXP Semiconductors LPC1311 User Manual

NXP Semiconductors LPC1311
368 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #171 background imageLoading...
Page #171 background image
UM10375 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
User manual Rev. 3 — 14 June 2011 171 of 368
NXP Semiconductors
UM10375
Chapter 11: LPC13xx USB on-chip drivers
MscDevInfo.MSC_Write = MSC_MemoryWrite;
5. Initialize the USB:
DeviceInfo.DevType = USB_DEVICE_CLASS_STORAGE;
DeviceInfo.DevDetailPtr = (uint32_t)&MscDevInfo;
(*rom)->pUSBD->init(&DeviceInfo);
6. Initialize the mass storage state machine:
(uint32_t *) BulkStage = 0x10000054;
*BulkStage = 0x0;
7. Add the USB interrupt handler to your project:
USB_IRQHandler(void)
{
(*rom)->pUSBD->isr();
}
8. Call USB connect:
(*rom)->pUSBD->connect(TRUE);
11.4.2 USB human interface driver
The following steps show how to use the USB human interface driver. A complete
example is available in the LPC13xx code bundle.
1. Map the pointer to the on chip driver table:
ROM ** rom = (ROM **)0x1fff1ff8;
2. Enable 32-bit timer 1 (CT32B1) and IOCONFIG block:
LPC_SYSCON->SYSAHBCLKCTRL |= (EN_TIMER32_1 | EN_IOCON);
3. Initialize USB clock and pins:
(*rom)->pUSBD->init_clk_pins();
4. Set up device type and information:
USB_DEV_INFO DeviceInfo;
HID_DEVICE_INFO HidDevInfo;
HidDevInfo.idVendor = USB_VENDOR_ID;
HidDevInfo.idProduct = USB_PROD_ID;
HidDevInfo.bcdDevice = USB_DEVICE;
HidDevInfo.StrDescPtr = (uint32_t)&USB_StringDescriptor[0];
HidDevInfo.InReportCount = 1;
HidDevInfo.OutReportCount = 1;
HidDevInfo.SampleInterval = 0x20;
HidDevInfo.InReport = GetInReport;
HidDevInfo.OutReport = SetOutReport;
5. Initialize the USB:
DeviceInfo.DevType = USB_DEVICE_CLASS_HUMAN_INTERFACE;

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the NXP Semiconductors LPC1311 and is the answer not in the manual?

NXP Semiconductors LPC1311 Specifications

General IconGeneral
BrandNXP Semiconductors
ModelLPC1311
CategoryController
LanguageEnglish

Related product manuals