/*! \file extint.c \brief External-Interrupt function library. */ //***************************************************************************** // // File Name : 'extint.c' // Title : External-Interrupt function library // Author : Pascal Stang - Copyright (C) 2002-2004 // Created : 5/10/2002 // Revised : 11/16/2004 // Version : 1.0 // Target MCU : Atmel AVR Series // Editor Tabs : 4 // // Notes: This library provides convenient standardized configuration and // access to external interrupts. The library is designed to make // it possible to write code that uses external interrupts without // digging into the processor datasheets to find register names and // bit-defines. The library also strives to allow code which uses // external interrupts to more easily cross-compile between different // microcontrollers. // // NOTE: Using this library has certain advantages, but also adds // overhead and latency to interrupt servicing. If the smallest // code size or fastest possible latency is needed, do NOT use this // library; link your interrupts directly. // //***************************************************************************** #include #include #include #include "global.h" #include "extint.h" // Global variables typedef void (*voidFuncPtr)(void); volatile static voidFuncPtr ExtIntFunc[EXTINT_NUM_INTERRUPTS]; // functions //! initializes extint library void extintInit(void) { u08 intNum; // detach all user functions from interrupts for(intNum=0; intNum