Hello everyone, I am looking for advice!
I am trying to find a way to send a file stored in an SD card from my nRF52840 to the PC usinig the USB CDC protocol.
The file size is quite large, in the order of Mb, do you think this solution is possible?
My idea is to read the file by block of 2048 byte and then send it trough USB using the .app_usbd_cdc_acm_write funcyion in a for cicle.
First issue I came across is the new line character used in app_usbd_cdc_acm_write function which is "\r\n", is there a way to change it to be '\n'?
The other issue regard the use of the app_usbd_cdc_acm_write which is asynchronous, how can i be sure that the all buffer has been sent before calling again the function?
In other words I need to wait that the transfer complted before reading new data from sd card and send them.
Thank you in advance!