USBD_CDC_ACM_WriteData() replaces 0x0D with 0x0A in the sent data.

Hi,

I'm using the Keil USB library to implement a CDC ACM driver (Keil Middleware v7.3.0)  to send data from my LPC4330 to a linux host. 

I'm sending an array of bytes to the host from the LPC4330.

The funtion USBD_CDC_ACM_WriteData() sends the data through, but changes all 0x0D(CR) bytes with 0x0A(LF).

Is there a way to disable this "feature", I would like to send through binary data and not have to convert everything to ASCII.

I'm using uVision 5.22.0.0.

/* Send packet to phytec */
osMutexWait(usb_tx_mutex, 0xFFFF);
if(USBD_Configured(0U))
{
    (void)USBD_CDC_ACM_WriteData(0U, ffsk_packet_buff, 29);
}
osMutexRelease(usb_tx_mutex);

Thanks,

Carel Bosch

More questions in this forum