LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions prototypes

Detailed Description

Functions

void SetupHardware (void)
 Hardware setup event callback function.
 
void EVENT_USB_Device_Connect (void)
 USB Device connect event callback.
 
void EVENT_USB_Device_Disconnect (void)
 USB Device disconnect event callback.
 
void EVENT_USB_Device_ConfigurationChanged (void)
 USB Device configuration change event callback.
 
void EVENT_USB_Device_ControlRequest (void)
 USB Device control request receive event callback.
 

Function Documentation

void EVENT_USB_Device_ConfigurationChanged ( void  )

USB Device configuration change event callback.

Event handler for the library USB Configuration Changed event.

Event for USB configuration number changed. This event fires when a the USB host changes the selected configuration number while in device mode. This event should be hooked in device applications to create the endpoints and configure the device for the selected configuration.

This event is time-critical; exceeding OS-specific delays within this event handler (typically of around one second) will prevent the device from enumerating correctly.

This event fires after the value of USB_Device_ConfigurationNumber has been changed.

Note
This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see USB Interface Management documentation).

Event handler for the library USB Configuration Changed event.

USB Device configuration change event callback.

Returns
Nothing

Definition at line 317 of file usbmsdev.c.

void EVENT_USB_Device_Connect ( void  )

USB Device connect event callback.

Event handler for the library USB Connection event.

Event for USB device connection. This event fires when the microcontroller is in USB Device mode and the device is connected to a USB host, beginning the enumeration process measured by a rising level on the microcontroller's VBUS sense pin.

This event is time-critical; exceeding OS-specific delays within this event handler (typically of around two seconds) will prevent the device from enumerating correctly.

Note
For the microcontrollers with limited USB controller functionality, VBUS sensing is not available. this means that the current connection state is derived from the bus suspension and wake up events by default, which is not always accurate (host may suspend the bus while still connected). If the actual connection state needs to be determined, VBUS should be routed to an external pin, and the auto-detect behaviour turned off by passing the NO_LIMITED_CONTROLLER_CONNECT token to the compiler via the -D switch at compile time. The connection and disconnection events may be manually fired, and the USB_DeviceState global changed manually.

This event may fire multiple times during device enumeration on the microcontrollers with limited USB controllers if NO_LIMITED_CONTROLLER_CONNECT is not defined.
See Also
USB Interface Management for more information on the USB management task and reducing CPU usage.

Event handler for the library USB Connection event.

USB Device connect event callback.

Returns
Nothing

Definition at line 309 of file usbmsdev.c.

void EVENT_USB_Device_ControlRequest ( void  )

USB Device control request receive event callback.

Event handler for the library USB Control Request reception event.

Event for control requests. This event fires when a the USB host issues a control request to the mandatory device control endpoint (of address 0). This may either be a standard request that the library may have a handler code for internally, or a class specific request issued to the device which must be handled appropriately. If a request is not processed in the user application via this event, it will be passed to the library for processing internally if a suitable handler exists.

This event is time-critical; each packet within the request transaction must be acknowledged or sent within 50ms or the host will abort the transfer.

The library internally handles all standard control requests with the exceptions of SYNC FRAME, SET DESCRIPTOR and SET INTERFACE. These and all other non-standard control requests will be left for the user to process via this event if desired. If not handled in the user application or by the library internally, unknown requests are automatically STALLed.

Note
This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see USB Interface Management documentation).

Requests should be handled in the same manner as described in the USB 2.0 Specification, or appropriate class specification. In all instances, the library has already read the request SETUP parameters into the USB_ControlRequest structure which should then be used by the application to determine how to handle the issued request.

Event handler for the library USB Control Request reception event.

USB Device control request receive event callback.

Returns
Nothing

Definition at line 325 of file usbmsdev.c.

void EVENT_USB_Device_Disconnect ( void  )

USB Device disconnect event callback.

Event handler for the library USB Disconnection event.

Event for USB device disconnection. This event fires when the microcontroller is in USB Device mode and the device is disconnected from a host, measured by a falling level on the microcontroller's VBUS sense pin.

Note
For the microcontrollers with limited USB controllers, VBUS sense is not available to the USB controller. this means that the current connection state is derived from the bus suspension and wake up events by default, which is not always accurate (host may suspend the bus while still connected). If the actual connection state needs to be determined, VBUS should be routed to an external pin, and the auto-detect behaviour turned off by passing the NO_LIMITED_CONTROLLER_CONNECT token to the compiler via the -D switch at compile time. The connection and disconnection events may be manually fired, and the USB_DeviceState global changed manually.

This event may fire multiple times during device enumeration on the microcontrollers with limited USB controllers if NO_LIMITED_CONTROLLER_CONNECT is not defined.
See Also
USB Interface Management for more information on the USB management task and reducing CPU usage.

Event handler for the library USB Disconnection event.

USB Device disconnect event callback.

Returns
Nothing

Definition at line 313 of file usbmsdev.c.

void SetupHardware ( void  )

Hardware setup event callback function.

Returns
None
Note
This is the USB HW set up event call back function

Configures the board hardware and chip peripherals for the demo's functionality.

Returns
None
Note
This is the USB HW set up event call back function

Configures the board hardware and chip peripherals for the demo's functionality.

Definition at line 381 of file AudioOutput.c.