Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CDC getkey
26-12-2011, 01:31 PM,
#1
CDC getkey
hi, I am new
I use PIC 4550 for USB with JAL and I want use Pinguino, it is cool !
Smile
When I compile an example with CDC.getkey or CDC.read, there is an error.
CDC.printf is ok.
I see __cdc.c in \P8\..\libraries , there is an /* */ for CDC.getkey, CDC.getsting funtions !

can you help me ?

think you
Blush
Reply
28-12-2011, 12:00 AM,
#2
RE: CDC getkey
Hi

CDC.getkey is not yet implemented on Pinguino 8 bits.
You can use CDC.read to read data buffer from the CDC device.

Syntax is:

unsigned char data[64];
unsigned char nb_byte_received;

nb_byte_received=CDC.read(data);

after this instruction a copy of the received buffer is in data if nb_byte_received>0

JP


(26-12-2011, 01:31 PM)brico31 Wrote: hi, I am new
I use PIC 4550 for USB with JAL and I want use Pinguino, it is cool !
Smile
When I compile an example with CDC.getkey or CDC.read, there is an error.
CDC.printf is ok.
I see __cdc.c in \P8\..\libraries , there is an /* */ for CDC.getkey, CDC.getsting funtions !

can you help me ?

think you
Blush

Reply
28-12-2011, 07:44 PM,
#3
RE: CDC getkey
Thank you JPierre for your answer, that works better with the good syntax for F4550 !
I am satisfied !

Brico31
Reply
30-12-2011, 09:22 PM,
#4
RE: CDC getkey
Hi,
CDC.getKey is available, try this :

// wait for a key to start
while (CDC.getKey() != '\r');

Régis
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)