Schau mal dort rein:
http://www.rn-wissen.de/index.php/FIFO_mit_avr-gcc