eclipse-threadx / usbx

Eclipse ThreadX - USBX is a high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with Eclipse ThreadX RTOS
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/usbx/index.md
MIT License
148 stars 88 forks source link

Where can we download the USBX OTG sample code based the NXP LPC3131? #74

Open Barfell opened 1 year ago

Barfell commented 1 year ago

I found the USBX OTG charpter on microsoft docs, the sample code based NXP LPC 3131, how can we down load the sample project code?

the site link as fllow: https://learn.microsoft.com/en-us/azure/rtos/usbx/usbx-device-stack-supplemental-5

Interrupt handlers Both host and device controller drivers for OTG needs different interrupt handlers to monitor signals beyond traditional USB interrupts, in particular signals due to SRP and VBUS.

How to initialize a USB OTG controller. We use the NXP LPC3131 as an example here.

/ Initialize the LPC3131 OTG controller. / status = ux_otg_lpc3131_initialize(0x19000000, lpc3131_vbus_function, tx_demo_change_mode_callback); In this example, we initialize the LPC3131 in OTG mode by passing a VBUS function and a callback for mode change (from host to slave or vice versa).

The callback function should simply record the new mode and wake up a pending thread to act up the new state.

xiaocq2001 commented 1 year ago

Maybe you can check if that is in NXP LPC3131 SDK?

Barfell commented 1 year ago

Not found NXP LPC3131 SDK in nxp.com.

xiaocq2001 commented 1 year ago

Unfortunately the LPC3131 is quite old and there is no live example project right now.

Barfell commented 1 year ago

In order to promote THREADX, Microsoft has specially produced a sample document, which is an example made of LPC3131 in the document, and does not provide a DEMO project.