X-Git-Url: http://git.linex4red.de/pub/USBaspLoader.git/blobdiff_plain/6756d217a20067b62258076d11bbe48a44a90400..90ff396e7d83b2ae713535226633feea6ed604da:/misc/iofixes.h diff --git a/misc/iofixes.h b/misc/iofixes.h new file mode 100644 index 0000000..fac3b7b --- /dev/null +++ b/misc/iofixes.h @@ -0,0 +1,89 @@ +/* Name: iofixes.h + * Project: USBaspLoader + * Author: Stephan Baerwolf + * Creation Date: 2013-12-16 + * Copyright: (c) 2013 by Stephan Baerwolf + * License: GNU GPL v2 (see License.txt) + * Version: 0.96.5-testing + */ + +#ifndef __IOFIXES_H_afa5e75bcfb24ef4a91ed4e7fe26e869 +#define __IOFIXES_H_afa5e75bcfb24ef4a91ed4e7fe26e869 1 + +/* + * WARNING: You should not edit this file ! + * + * The purpose of this file is the implementation of + * workaround for known bugs in existing AVR toolchains. + * + * Most of the time it will fix missing definitions + * for registers and bitvalues. + * + */ + +#include + + +/* ---------------------- Workarounds AVR IO BUGs ---------------------- */ +#if defined (__AVR_ATmega88A__) + +/* ATmega88A */ + +/* IVCE */ +# ifndef IVCE +# warning IVCE not defined for ATmega88A - fixing +# define IVCE 0 +# endif + +/* IVSEL */ +# ifndef IVSEL +# warning IVSEL not defined for ATmega88A - fixing +# define IVSEL 1 +# endif + +/* RWWSRE */ +# ifndef RWWSRE +# warning RWWSRE not defined for ATmega88A - fixing +# define RWWSRE 4 +# endif + + + + + + + +#elif defined (__AVR_ATmega168A__) + +/* ATmega168A */ + +/* IVCE */ +# ifndef IVCE +# warning IVCE not defined for ATmega168A - fixing +# define IVCE 0 +# endif + +/* IVSEL */ +# ifndef IVSEL +# warning IVSEL not defined for ATmega168A - fixing +# define IVSEL 1 +# endif + +/* RWWSRE */ +# ifndef RWWSRE +# warning RWWSRE not defined for ATmega168A - fixing +# define RWWSRE 4 +# endif + +/* RWWSB */ +# ifndef RWWSB +# warning RWWSB not defined for ATmega168A - fixing +# define RWWSB 6 +# endif + + + +#endif + + +#endif