3 Creating a Project

The table below shows the list of files contained in this library along with a short description.

To include this library in a new project, “atmel_led_device_config.h” must be configured (as explained in the following chapter) and added along with the required driver files and the compiler file (avr_compiler.h). For example, to create a project for ATxmega TWI interface, the following files should be included:

  • atxmega_twi_driver.c
  • atxmega_twi_driver.h
  • avr_compiler.h*
  • atmel_led_device_config.h*

The configuration and compiler files (marked with *) must be included irrespective of the AVR and interface as the project will not compile without these.

In the user application source file, include “atmel_led_device_config.h” by adding the following statement on the top:

#include "atmel_led_device_config.h"
This file will automatically include all the required files. The file “atmel_led_drvr_demo.c” provides a very good example of how to include and use this library.
Table 3-1. List of Files in the Atmel LED Driver Library
Source fileDescription
atmega_twi_driver.cDriver for megaAVR with TWI interface
atmega_twi_driver.hHeader file for atmega_twi_driver.c
atxmega_twi_driver.cDriver for XMEGA AVR with TWI interface
atxmega_twi_driver.hHeader file for atxmega_twi_driver.h
tiny_avr_spi_via_usi_driver.cDriver for tinyAVR with USI interface
tiny_avr_spi_via_usi_driver.hHeader file for tiny_avr_spi_via_usi_driver.c
tiny_avr_spi_driver.cDriver for tinyAVR with SPI interface
tiny_avr_spi_driver.hHeader for tiny_avr_spi_driver.c
atmel_led_device_config.hAtmel LED driver library configuration file
atmel_led_drvr_demo.cAtmel LED driver library demo application
avr_compiler.hAVR compiler file
documentation.hUsed only by Doxygen