Add start of platform-specific abstraction files
authorKevin Rosenberg <kevin@rosenberg.net>
Thu, 26 Jun 2008 22:30:02 +0000 (16:30 -0600)
committerKevin Rosenberg <kevin@rosenberg.net>
Thu, 26 Jun 2008 22:30:02 +0000 (16:30 -0600)
src/LICENSE [new file with mode: 0644]
src/avrcal.h [new file with mode: 0644]
src/cal.h [deleted file]
src/calcv.h [new file with mode: 0644]
src/calgcc.h [new file with mode: 0644]
src/caliar.h [new file with mode: 0644]
src/calicc.h [new file with mode: 0644]

diff --git a/src/LICENSE b/src/LICENSE
new file mode 100644 (file)
index 0000000..18c4f6a
--- /dev/null
@@ -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 (file)
index 0000000..8f802a2
--- /dev/null
@@ -0,0 +1,45 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          avrcal.h
+**   Purpose:       AVR C Compiler Abstraction Layer Common Header File
+**   Programmer:    Kevin Rosenberg <kevin@rosenberg.net> (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 <calgcc.h>
+
+// IAR C Compiler
+#elif defined(__ICCAVR__)
+#include <caliar.h>
+
+// ImageCraft C Compiler
+#elif defined(__IMAGECRAFT__)
+#include <calicc.h>
+
+// CodeVision AVR C Compiler
+#elif defined(__CODEVISIONAVR__)
+#include <calcv.h>
+
+#else
+#error Unknown / Unsupported Platform
+#endif
+
+#endif
+
+
+
+
diff --git a/src/cal.h b/src/cal.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/calcv.h b/src/calcv.h
new file mode 100644 (file)
index 0000000..69c7a95
--- /dev/null
@@ -0,0 +1,28 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          calcv.h
+**   Purpose:       AVR C Compiler Abstraction Layer for CodeVision C Compiler
+**   Programmer:    Kevin Rosenberg <kevin@rosenberg.net> (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 <io.h>
+
+#endif
diff --git a/src/calgcc.h b/src/calgcc.h
new file mode 100644 (file)
index 0000000..0bef805
--- /dev/null
@@ -0,0 +1,28 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          calgcc.h
+**   Purpose:       AVR C Compiler Abstraction Layer for AVR-GCC
+**   Programmer:    Kevin Rosenberg <kevin@rosenberg.net> (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 <avr/io.h>
+
+#endif
diff --git a/src/caliar.h b/src/caliar.h
new file mode 100644 (file)
index 0000000..251f260
--- /dev/null
@@ -0,0 +1,29 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          caliar.h
+**   Purpose:       AVR C Compiler Abstraction Layer for IAR C Compiler for AVR
+**   Programmer:    Kevin Rosenberg <kevin@rosenberg.net> (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 <ioavr.h>
+#include <intrinsics.h>
+
+#endif
diff --git a/src/calicc.h b/src/calicc.h
new file mode 100644 (file)
index 0000000..4529f02
--- /dev/null
@@ -0,0 +1,28 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          calicc.h
+**   Purpose:       AVR C Compiler Abstraction Layer for ImageCraft C Compiler
+**   Programmer:    Kevin Rosenberg <kevin@rosenberg.net> (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 <iccioavr.h>
+
+#endif