I know what you mean Graham. But I need only the very "simple"
application of a virtual com port and actually I got it to work now
with the following code:
Code:
Endpoint_SelectEndpoint(VirtualSerial_CDC_Interface.Config.DataOUTEndpoint.Address);
f(Endpoint_IsOUTReceived())
{
while(Endpoint_IsReadWriteAllowed())
{
if (!(RingBuffer_IsFull(&USB_Buffer)))
{
endP_read = Endpoint_Read_8();
RingBuffer_Insert(&USB_Buffer, endP_read);
}
}
Endpoint_ClearOUT();
fprintf(&USBSerialStream,"endP_read \percent x \r\n", endP_read);
}
}
CDC_Device_USBTask(&VirtualSerial_CDC_Interface);
USB_USBTask();
I used the RingBuffer_t structure to store the incoming data and so
far it works fine. But now I encountered another problem. I have to
use also some SPI interfaces and the internal ADC for my project and
therefore I would like to use Atmels framework within AVRStudio 5.1.
So now I am trying to combine the LUFA with the ASF within a project.
Do you have some suggestions how to do that? Should I try it without
the makefile otherwise I would have to specify all the c-files and
include paths? |