My application is based on usb/device/examples/cdc/virtual_com. When I call
fopen ( "gpio:read", (char_ptr)&gpio_int ); with
GPIO_PIN_STRUCT gpio_int[] = { BSP_SW1 | GPIO_PIN_IRQ_FALLING | GPIO_PIN_IRQ_RISING, GPIO_LIST_END };
the usb cdc communication is breaking off.
The behavior is similar as reported by ARQuattr, see https://community.freescale.com/message/89394#89394
I can exclude RAM / stack space as cause.
The usb cdc task is initialized with
{ CDC_TASK, cdc_task, 2*3000L, 7L, "CDC", MQX_AUTO_START_TASK, 0, 0 },
and the task calling the fopen is configured with value 8L for priority.
Can I use gpio:read together with usb cdc device? Should I use low level ISR for GPIO interrupt handling instead of gpio:read?