USB_DeviceCdcAcmSend, value of class handle (class_handle_t) on LPC55s69

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB_DeviceCdcAcmSend, value of class handle (class_handle_t) on LPC55s69

Jump to solution
1,012 Views
gertvb
Contributor III

Good Day Everyone!

Not a problem, just a minor question

I am using 2X VCom ports on the USB Full speed adapter USB0 on the LPC55s69

Ive created the 2 ports with MCUXpresso Configtools and use USB_DeviceCdcAcmSend to write data back to 2 TeraTerm instances from the main loop - and everything works fine!

 

I just want to find out if the value for class_handle_t as used in USB_DeviceCdcAcmSend is exposed in a header file somewhere?

 

Currently I am using :0x40101580 and 0x401015e8 as hardcoded magic numbers as parameters to USB_DeviceCdcAcmSend, and although it works fine, I would rather use the data structures as used in the USB system, but I am unable to to find any exposed in a header file somewhere

Thanks

A TechExplorer working with Embedded Software and Electronics in Agriculture and Alternative Energy
Labels (1)
0 Kudos
1 Solution
991 Views
gertvb
Contributor III

Thanks for the reply! Much appreciated

Got it working properly by referencing "g_UsbDeviceComposite" as declared in usb_device_composite.c

 

usb_device_composite_struct_t *ptr_UsbDeviceComposite;
ptr_UsbDeviceComposite = &g_UsbDeviceComposite;

USB_DeviceCdcAcmSend(ptr_UsbDeviceComposite->interface0CicVcomHandle, 2, s_VCom_Send_Buffer, i_Size_VCom_Send_Buffer);

A TechExplorer working with Embedded Software and Electronics in Agriculture and Alternative Energy

View solution in original post

0 Kudos
2 Replies
992 Views
gertvb
Contributor III

Thanks for the reply! Much appreciated

Got it working properly by referencing "g_UsbDeviceComposite" as declared in usb_device_composite.c

 

usb_device_composite_struct_t *ptr_UsbDeviceComposite;
ptr_UsbDeviceComposite = &g_UsbDeviceComposite;

USB_DeviceCdcAcmSend(ptr_UsbDeviceComposite->interface0CicVcomHandle, 2, s_VCom_Send_Buffer, i_Size_VCom_Send_Buffer);

A TechExplorer working with Embedded Software and Electronics in Agriculture and Alternative Energy
0 Kudos
997 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I don't suggest you use hardcode as parameter because it causes your code not flexible.

You can refer MCUXpresso SDK cdc demo code to mange yours code.

regarding to your hardcode 0x40101580 ,  I suggest you check g_cdcAcmHandle, this structure should defined at this address.