I am an occasional user of SAMD21 and I am not an expert.
I have an application where reading data from ADC via SPI and sending it further to PC via USB CDC.
Everything as fast as possible without interruption, as ADC data must be acquired in precise time intervals and with SAMD21.
Occasionally ADC settings can be changed during the operation by sending them from PC. In such event, data acquisition interruption is allowed.
in ASF3 there was a function called "udi_cdc_is_rx_ready()" to check if there is any data from PC waiting on port.
Now in ASF4 I can not find such function.
I am also thinking of how to trigger an interrupt when there is data sent from PC
Any help is appreciated.