cancel
Showing results for 
Search instead for 
Did you mean: 

Add PIMA device class to USBX

MButsch
Associate III

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

4 REPLIES 4

Hello @MButsch​ ,

Take a look at this reference witch contains some code examples.

I hope this helps you.

BeST Regards,

Walid

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

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

hello,

Well, THAT is disappointing.

Any timeframe for having the PIMA class functional?

Thanks,

Mark