avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] question about ATMEL USB Wizard.


From: temp12000
Subject: [avr-gcc-list] question about ATMEL USB Wizard.
Date: Sat, 11 Dec 2004 13:25:19 -0800 (PST)

Hi, There,

I'm using ATMEL USB Wizard to generate firmware source
code for USB keyboard (AT43USB326). I have some
experience of developing EZUSB firmware, but this is
the first time I use ATMEL's USB chip. I have some
questions about the generated code:

1) there are codes like this:
#ifdef PS2
  unsigned char Check_Alt_Protocol(void) ;
  unsigned char Check_Alt_Protocol_Ready(void) ;
  unsigned char Alt_Protocol(void) ;
  void FillPS2Fifo(unsigned char*, int num, unsigned
char modifier);
  void Get_PS2(void) ;
#else
  #define Alt_Protocol()        FALSE
  #define FillPS2Fifo(x,y,z)    FALSE
  #define Get_PS2()             FALSE
#endif

Does PS2 defined in USB library file? What does it
mean? What does Check_Alt_Protocol do?

2) In APP_MainTask(), there is code:
if ((*ppKeyRep != NULL) && KBFlags_GetReady2Read())
   {
        KBFlags_ClearReady2Read();
#ifdef PS2
if ( Alt_Protocol() )
{                                                 
FillPS2Fifo((*ppKeyRep)+2,6,KEYBD);// for PS2 ignore
first 2 bytes
FillPS2Fifo(*ppKeyRep,1,MODIFY);   // Xlate modifier
byte first  
}
else
#endif                                   
{
FillFifo(FDR1, *ppKeyRep, 8);
*FCAR1 = TX_PACKET_READY;
}
}                                         // end of
ppKeyRep!= NULL

Is this the code to send report to host? I want to
customize the keyboard. For example, for each keyboard
report (because of keyboard input from user) send to
host, I want to send a special report to confirm it is
from this customized keyboard. What I should do? Just
use FillFifo to send the special report?

BTW, if you know where I should ask this kind of
questions, please let me know.

Thank you very much

temp


=====
http://mybooks.somee.com

Lots of FREE books about programming.
==============================================


                
__________________________________ 
Do you Yahoo!? 
Send a seasonal email greeting and help others. Do good. 
http://celebrity.mail.yahoo.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]