From a7cfbc1ed842fa277040edabc7df51af8cb31944 Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Thu, 26 Jun 2008 16:30:02 -0600 Subject: [PATCH] Add start of platform-specific abstraction files --- src/LICENSE | 25 +++++++++++++++++++++++++ src/avrcal.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/cal.h | 0 src/calcv.h | 28 ++++++++++++++++++++++++++++ src/calgcc.h | 28 ++++++++++++++++++++++++++++ src/caliar.h | 29 +++++++++++++++++++++++++++++ src/calicc.h | 28 ++++++++++++++++++++++++++++ 7 files changed, 183 insertions(+) create mode 100644 src/LICENSE create mode 100644 src/avrcal.h delete mode 100644 src/cal.h create mode 100644 src/calcv.h create mode 100644 src/calgcc.h create mode 100644 src/caliar.h create mode 100644 src/calicc.h diff --git a/src/LICENSE b/src/LICENSE new file mode 100644 index 0000000..18c4f6a --- /dev/null +++ b/src/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2008 by Kevin Rosenberg. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the author nor the names of the contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. diff --git a/src/avrcal.h b/src/avrcal.h new file mode 100644 index 0000000..8f802a2 --- /dev/null +++ b/src/avrcal.h @@ -0,0 +1,45 @@ +/***************************************************************************** +** FILE IDENTIFICATION +** +** Name: avrcal.h +** Purpose: AVR C Compiler Abstraction Layer Common Header File +** Programmer: Kevin Rosenberg (AVRFreaks: kmr) +** Date Started: Dec 2007 +** +** Copyright (c) 2008 by Kevin Rosenberg. All rights reserved. +** +** LICENSE +** See accompaning LICENSE file +** +** CHANGES +** See accompaning ChangeLog file +******************************************************************************/ + +#ifndef __AVRCAL_H__ +#define __AVRCAL_H__ + +// AVR-GCC C Compiler +#if defined(__GNUC__) +#include + +// IAR C Compiler +#elif defined(__ICCAVR__) +#include + +// ImageCraft C Compiler +#elif defined(__IMAGECRAFT__) +#include + +// CodeVision AVR C Compiler +#elif defined(__CODEVISIONAVR__) +#include + +#else +#error Unknown / Unsupported Platform +#endif + +#endif + + + + diff --git a/src/cal.h b/src/cal.h deleted file mode 100644 index e69de29..0000000 diff --git a/src/calcv.h b/src/calcv.h new file mode 100644 index 0000000..69c7a95 --- /dev/null +++ b/src/calcv.h @@ -0,0 +1,28 @@ +/***************************************************************************** +** FILE IDENTIFICATION +** +** Name: calcv.h +** Purpose: AVR C Compiler Abstraction Layer for CodeVision C Compiler +** Programmer: Kevin Rosenberg (AVRFreaks: kmr) +** Date Started: Dec 2007 +** +** Copyright (c) 2008 by Kevin Rosenberg. All rights reserved. +** +** LICENSE +** See accompaning LICENSE file +** +** CHANGES +** See accompaning ChangeLog file +******************************************************************************/ + +#ifndef __CALCV_H__ +#define __CALCV_H__ + +#ifndef __AVRCAL_H__ +#error This file should not be directly included. It is included by avrcal.h +#endif + +// Standard header files +#include + +#endif diff --git a/src/calgcc.h b/src/calgcc.h new file mode 100644 index 0000000..0bef805 --- /dev/null +++ b/src/calgcc.h @@ -0,0 +1,28 @@ +/***************************************************************************** +** FILE IDENTIFICATION +** +** Name: calgcc.h +** Purpose: AVR C Compiler Abstraction Layer for AVR-GCC +** Programmer: Kevin Rosenberg (AVRFreaks: kmr) +** Date Started: Dec 2007 +** +** Copyright (c) 2008 by Kevin Rosenberg. All rights reserved. +** +** LICENSE +** See accompaning LICENSE file +** +** CHANGES +** See accompaning ChangeLog file +******************************************************************************/ + +#ifndef __CALGCC_H__ +#define __CALGCC_H__ + +#ifndef __AVRCAL_H__ +#error This file should not be directly included. It is included by avrcal.h +#endif + +// Standard header files +#include + +#endif diff --git a/src/caliar.h b/src/caliar.h new file mode 100644 index 0000000..251f260 --- /dev/null +++ b/src/caliar.h @@ -0,0 +1,29 @@ +/***************************************************************************** +** FILE IDENTIFICATION +** +** Name: caliar.h +** Purpose: AVR C Compiler Abstraction Layer for IAR C Compiler for AVR +** Programmer: Kevin Rosenberg (AVRFreaks: kmr) +** Date Started: Dec 2007 +** +** Copyright (c) 2008 by Kevin Rosenberg. All rights reserved. +** +** LICENSE +** See accompaning LICENSE file +** +** CHANGES +** See accompaning ChangeLog file +******************************************************************************/ + +#ifndef __CALIAR_H__ +#define __CALIAR_H__ + +#ifndef __AVRCAL_H__ +#error This file should not be directly included. It is included by avrcal.h +#endif + +// Standard header files +#include +#include + +#endif diff --git a/src/calicc.h b/src/calicc.h new file mode 100644 index 0000000..4529f02 --- /dev/null +++ b/src/calicc.h @@ -0,0 +1,28 @@ +/***************************************************************************** +** FILE IDENTIFICATION +** +** Name: calicc.h +** Purpose: AVR C Compiler Abstraction Layer for ImageCraft C Compiler +** Programmer: Kevin Rosenberg (AVRFreaks: kmr) +** Date Started: Dec 2007 +** +** Copyright (c) 2008 by Kevin Rosenberg. All rights reserved. +** +** LICENSE +** See accompaning LICENSE file +** +** CHANGES +** See accompaning ChangeLog file +******************************************************************************/ + +#ifndef __CALICC_H__ +#define __CALICC_H__ + +#ifndef __AVRCAL_H__ +#error This file should not be directly included. It is included by avrcal.h +#endif + +// Standard header files +#include + +#endif -- 2.34.1