abcminiuser / lufa

LUFA - the Lightweight USB Framework for AVRs.
http://www.lufa-lib.org
1.04k stars 325 forks source link

Zeroes being blocked by virtual serial port #26

Closed fishtrousers closed 10 years ago

fishtrousers commented 10 years ago

I'm doing binary transfers using the LUFA serial port. I can send 0x00 from the AVR to my PC via the USB serial port no problem but going the other way 0x00 get blocked, all other values seem to get through. Have I got some configuration wrong or is it a bug? All advice gratefully received!

abcminiuser commented 10 years ago

This shouldn't be a problem; the CDC serial stream is just a byte stream (no framing that is user visible). What code are you using exactly to send the data?

fishtrousers commented 10 years ago

Hi Dean,

Thanks for getting back to me. I looked at my code again and spotted the problem - I put if ((rxByte = CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface)) > 0) { // get character if there is one

instead of if ((rxByte = CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface)) >= 0) { // get character if there is one

Sorry to have bothered you.

Thanks, Martin

On 16/05/2014, at 9:52 PM, Dean Camera notifications@github.com wrote:

This shouldn't be a problem; the CDC serial stream is just a byte stream (no framing that is user visible). What code are you using exactly to send the data?

— Reply to this email directly or view it on GitHub.

abcminiuser commented 10 years ago

No worries! Closing issue.