USB stack configuration

Device configuration

A device configuration file is set up for each example, such as:

<install_dir>/boards/twrk22f120m/usb_examples/usb_device_hid_mouse/bm/usb_device_config.h

This file is used to either enable or disable the USB class driver and to configure the interface type (high-speed or full speed). The object number is configurable either to decrease the memory usage or to meet specific requirements.

If the device stack configuration is changed, rebuild the example projects. For each device, follow these steps.

If the board is a Tower or Freedom platform, enable the following macros:

  1. Enable #define USB_DEVICE_CONFIG_KHCI (0U) macro for full speed.

  2. Enable #define USB_DEVICE_CONFIG_EHCI (0U) macro if the board supports high-speed.

    Note: Only EHCI support pin detect feature.

If board is part of the LPC series, enable the following macros:

  1. Enable #define USB_DEVICE_CONFIG_LPCIP3511FS (0U) macro for full speed.

  2. Enable #define USB_DEVICE_CONFIG_LPCIP3511HS (0U) macro if the board supports high-speed.

Parent topic:USB stack configuration

Host configuration

A host configuration file is set up for each example, such as:

<install_dir>/boards/twrk22f120m/usb_examples/usb_host_hid_mouse/bm/usb_host_config.h

This file is used to either enable or disable the USB class driver. The object number is configurable either to decrease the memory usage or to meet specific requirements.

If the Host stack configuration is changed, rebuild the example projects.

For each Host, follow these steps.

If the board is a Tower for Freedom platform, enable the following macros:

Enable this macro for full speed.

#define USB_HOST_CONFIG_KHCI (0U)

Enable this macro if the board supports high-speed.

#define USB_HOST_CONFIG_EHCI (0U)

Note: Only EHCI support pin detect feature.

If board is part of the LPC series, enable the following macros:

Enable this macro for full speed.

#define USB_HOST_CONFIG_OHCI (0U)

Enable this macro if the board supports high-speed.

#define USB_HOST_CONFIG_IP3516HS (0U)

Parent topic:USB stack configuration