This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Parse Error - __irq


Hi Niklaus,

    Please find the content of header file(2410IIC.h):
void __irq IicInt(void);

Definition of corresponding irq in
2410IIC.c(filename)is as follows:

void __irq IicInt(void)
{
    U32 iicSt,i;
    
    rSRCPND = BIT_IIC;          //Clear pending bit
    rINTPND = BIT_IIC;
    iicSt   = rIICSTAT; 
    
    if(iicSt & 0x8){}           //When bus arbitration
is failed.
    if(iicSt & 0x4){}           //When a slave address
is matched with IICADD
    if(iicSt & 0x2){}           //When a slave address
is 0000000b
    if(iicSt & 0x1){}           //When ACK isn't
received

    switch(_iicMode)
    {
       case POLLACK:
           _iicStatus = iicSt;
           break;

       case RDDATA:
           if((_iicDataCount--)==0)
           {
               _iicData[_iicPt++] = rIICDS;
            
               rIICSTAT = 0x90;                 //Stop
MasRx condition 
               rIICCON  = 0xaf;                
//Resumes IIC operation.
               Delay(1);                        //Wait
until stop condtion is in effect.
                                                //Too
long time... 
                                                //The
pending bit will not be set after issuing stop
condition.
               break;    
           }      
           _iicData[_iicPt++] = rIICDS;         //The
last data has to be read with no ack.

           if((_iicDataCount)==0)
               rIICCON = 0x2f;                 
//Resumes IIC operation with NOACK.  
           else 
               rIICCON = 0xaf;                 
//Resumes IIC operation with ACK
               break;

        case WRDATA:
            if((_iicDataCount--)==0)
            {
                rIICSTAT = 0xd0;                //Stop
MasTx condition 
                rIICCON  = 0xaf;               
//Resumes IIC operation.
                Delay(1);                       //Wait
until stop condtion is in effect.
                       //The pending bit will not be
set after issuing stop condition.
                break;    
            }
            rIICDS = _iicData[_iicPt++];       
//_iicData[0] has dummy.
            for(i=0;i<10;i++);                  //for
setup time until rising edge of IICSCL
              
            rIICCON = 0xaf;                    
//resumes IIC operation.
            break;

        case SETRDADDR:
//          Uart_Printf("[ S%d ]",_iicDataCount);
            if((_iicDataCount--)==0)
                break;                          //IIC
operation is stopped because of IICCON[4]    
            rIICDS = _iicData[_iicPt++];
            for(i=0;i<10;i++);                  //For
setup time until rising edge of IICSCL
            rIICCON = 0xaf;                    
//Resumes IIC operation.
            break;

        default:
            break;      
    }
}

Output of gcc:

linux>> arm-elf-gcc -c -g -mcpu=arm920t
-mlittle-endian -mapcs 2410IIC.c

linux>> 2410IIC.h; parse error before 'IicInt'
linux>> 2410IIC.c; parse error before 'IicInt' 

   

--- Niklaus <niklaus@gmail.com> wrote:

> On 4/11/06, Bindu R <catchdots@yahoo.com> wrote:
> > Hi,
> >
> > I want to know how use __irq (interruption) at
> > arm-elf-
> > gcc to ARM920T, i try to compile a C program with
> > this parameter (__irq) and it say "parse error".
> > Please can somebody help me or tell me about how i
> fix
> > it.
> >
> > Thanks for your time.
> Please give the complete source code of the file and
> what output gcc -v gives.
> >
> > Regards,
> > Bindu
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]