Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Help with virtual com port with gnu

2006-05-22 by Erick Damasceno

Bertrik,

Thanks a lot for all information that ou give to me. But i need another: When i try to compile the code, i receive a error in usbcore.c saying "invalid lvalue assignment" on the lines followed:

            (BYTE *)pD += (((USB_CONFIGURATION_DESCRIPTOR *)pD)->wTotalLength);

      (BYTE *)pD += pD->bLength;

In addition, several warnings are related on:

const void (* USB_P_EP[16]) (DWORD event) = {
  P_EP(0),
  P_EP(1),
  P_EP(2),
  P_EP(3),
  P_EP(4),
  P_EP(5),
  P_EP(6),
  P_EP(7),
  P_EP(8),
  P_EP(9),
  P_EP(10),
  P_EP(11),
  P_EP(12),
  P_EP(13),
  P_EP(14),
  P_EP(15),
};

 This warnings say "initialization from incompatible type". Can you help with this????

Sorry, because i'm newbie in arm, and i need to port this archive because my notebook don't have rs232 neither parallel port, so i really need this usb working.

Thanks,

Erick

Bertrik Sikken <bertrik@sikken.nl> escreveu:    Erick Damasceno wrote:
 > I'm new in this forum and i would like to know if anyone here have
 > succed porting the keil virtual com port code for the gnu. I saw a
 > post from bertrik saying that he made this happen, but i want de
 > codes to understand everything. If anyone can help, thanks
 
 A list of the required changes is in this message:
 http://groups.yahoo.com/group/lpc2000/message/12327
 
 Examples:
 * struct packing (usb.h)
 typedef struct _USB_SETUP_PACKET {
 needs to be changed into
 typedef struct __attribute__ ((packed)) _USB_SETUP_PACKET {
 (the other structures should receive similar changes)
 * interrupt attribute
 Interrupt service routine should be declared as follows (usbhw.h)
 extern void  USB_ISR        (void) __attribute__ ((interrupt));
 * porting functions that us __packed on left-hand-side (usbhw.c)
 in USB_ReadEP, use the following in the for-loop
       dw = RX_DATA;
       *pData++ = dw >> 0;
       *pData++ = dw >> 8;
       *pData++ = dw >> 16;
       *pData++ = dw >> 24;
 in USB_WriteEP, use the following in the for-loop
       TX_DATA = (pData[3] << 24) | (pData[2] << 16) | (pData[1] << 8) | pData[0];
       pData += 4;
 
 Regards,
 Bertrik
            

        SPONSORED LINKS   
                                                    Microcontrollers                                       Microprocessor                                       Intel microprocessors                                                                 
      
---------------------------------
   YAHOO! GROUPS LINKS 
 
    
    Visit your group "lpc2000" on the web.
    
    To unsubscribe from this group, send an email to:
 lpc2000-unsubscribe@...m
    
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
 
    
---------------------------------
 
 
     

		
---------------------------------
 Abra sua conta no Yahoo! Mail - 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz. 

[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.