3.2.1 Including header files

When a C program includes the proper header, and the Makefile is properly set up, a C program can use handy symbolic name to control the I/O features of an MCU.

Generally speaking, you want to place the following lines at the beginning of a C program:

#include <avr/io.h>
#include <avr/ina90.h>

Also, specify the MCU in a Makefile:

MCU = atmega128

This combination allows gcc automatically include the correct header file for the chosen MCU (so that you don't have to make your program specify to a particular MCU).



Copyright © 2006-02-15 by Tak Auyeung