This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Modifying USB CDC example

Hi there,

I am trying to modify the USB CDC ACM example to work as a USB CCID. Right now the main issue that I'm facing is macros on top of macros.

It's perfectly understandable that it's easy and straightforward to have macros that you can use to programatically generate and document source code,
however if I want to modify this device's USB descriptors, it's hard and inconvenient to follow the thread of macros.

Is there a way to see what the following macro that is used in the USB CDC ACM example will get evaluated to?

APP_USBD_CDC_ACM_GLOBAL_DEF(m_app_cdc_acm,
                            cdc_acm_user_ev_handler,
                            CDC_ACM_COMM_INTERFACE,
                            CDC_ACM_DATA_INTERFACE,
                            CDC_ACM_COMM_EPIN,
                            CDC_ACM_DATA_EPIN,
                            CDC_ACM_DATA_EPOUT,
                            APP_USBD_CDC_COMM_PROTOCOL_AT_V250
);

I've tried using `gcc -E main.c` but this would obviously fail because there are includes missing...

How can I print out the "text" representation of what `m_app_cdc_acm` will look like before compiling stage?

Thank you in advance.

Parents Reply Children
No Data
Related