2021-10-21 11:29 AM
I am trying to add the PIMA device class to USBX. I have used CubeMX to enable the PIMA device class and am trying to fill in the missing details to make it work.
It looks like I need to have something handle the PIMA class in USBD_FrameWork_AddToConfDesc(), but don't know how to add an additional enum to USBD_CompositeClassTypeDef in ux_device_descriptors.h
/* Enum Class Type */
typedef enum
{
CLASS_TYPE_NONE = 0,
CLASS_TYPE_HID = 1,
CLASS_TYPE_CDC_ACM = 2,
CLASS_TYPE_MSC = 3,
CLASS_TYPE_CDC_ECM = 4,
CLASS_TYPE_DFU = 5,
} USBD_CompositeClassTypeDef;
Any guidance?
Thanks,
Mark
2021-10-22 03:35 AM
Hello @MButsch ,
Take a look at this reference witch contains some code examples.
I hope this helps you.
BeST Regards,
Walid
2021-10-22 04:37 AM
Hello,
Yes, i have been looking at hat reference. I haven't seen anything that describes how to "get it all initialized" though.
I have worked with the MSC example and CubeMX generates more complete code and uses CLASS_TYPE_MSC as below:
uint8_t UserClassInstance[USBD_MAX_CLASS_INTERFACES] = {
CLASS_TYPE_MSC,
};
I have found nothing like a "CLASS_TYPE_PIMA" that could be used in USBD_FrameWork_AddToConfDesc() to populate the necessary info into the framework.
I faked it by add CLASS_TYPE_PIMA to the enum and adding a case for it in USBD_FrameWork_AddToConfDesc() and have gotten it to enumerate to my windows PC. I still need to supply all the supporting code for the actions.
Can someone tell me the "correct" way to do this in AzureRTOS? The enum is NOT in a user code block, so it will get destroyed everytime I generate code. So that doesn't seem like the correct way.
Thanks,
Mark
2021-10-27 09:14 AM
Hello @MButsch
I've checked internally with the USB team, and they confirmed that the PIMA class will be supported in the future but not right now.
Thus, changing the enumeration only won't work. Additional development effort is needed to support the class.
BeST Regards,
Walid
2021-10-27 12:11 PM
hello,
Well, THAT is disappointing.
Any timeframe for having the PIMA class functional?
Thanks,
Mark