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

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

[avr-gcc-list] SPI interrupt and compiler warning help


From: David Morrison
Subject: [avr-gcc-list] SPI interrupt and compiler warning help
Date: Sun, 28 Mar 2004 18:28:02 -0800 (PST)

Hi all,
 
could someone explain why I am getting the following warning?  
 
 
Compiling: spi_master.c
avr-gcc -c -mmcu=atmega128 -I. -g -Os -funsigned-char -funsigned-bitfields -fpac
k-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=spi_master.lst  -st
d=gnu99 spi_master.c -o spi_master.o
spi_master.c:70: warning: return type defaults to `int'
spi_master.c:70: warning: function declaration isn't a prototype
spi_master.c: In function `SIGNAL':
spi_master.c:70: warning: type of `__vector_17' defaults to `int'
spi_master.c:83: warning: control reaches end of non-void function

 
 
I am attempting to compile the following spi isr:
 
SIGNAL(SIG_SPI)
{
  unsigned char tmptail;
  /* Check if all data is transmitted */
  if ( SPI_TxHead != SPI_TxTail )
    {
      /* Calculate buffer index */
      tmptail = ( SPI_TxTail + 1 ) & SPI_TX_BUFFER_MASK;
      /* Store new index */
      SPI_TxTail = tmptail;      
      /* Start transmition */
      SPDR = SPI_TxBuf[tmptail]; 
    }
}

 
strange thing is that I do not get the same warning on other ISRs that I have 
written.
 
Thanks,
dave
 


I have always wished that my computer would be as easy to use as my telephone. 
My wish has come true. I no longer know how to use my telephone.
        -Bjarne Stroustrup, computer science professor, designer of C++
       programming language (1950- )
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


reply via email to

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