Permalink
Browse files

Convert to UNIX line endings like the rest of the source is

  • Loading branch information...
1 parent 965ed56 commit 6df03e8330321cbe3cfb02499bb55f29f1265d4f @CapnBry committed Aug 21, 2011
Showing with 1,601 additions and 1,601 deletions.
  1. +83 −83 avrlibdefs.h
  2. +84 −84 avrlibtypes.h
  3. +60 −60 config.h
  4. +712 −712 g2100.c
  5. +389 −389 g2100.h
  6. +2 −2 global-conf.h
  7. +32 −32 global.h
  8. +167 −167 spi.h
  9. +72 −72 witypes.h
View
@@ -1,83 +1,83 @@
-/*! \file avrlibdefs.h \brief AVRlib global defines and macros. */
-//*****************************************************************************
-//
-// File Name : 'avrlibdefs.h'
-// Title : AVRlib global defines and macros include file
-// Author : Pascal Stang
-// Created : 7/12/2001
-// Revised : 9/30/2002
-// Version : 1.1
-// Target MCU : Atmel AVR series
-// Editor Tabs : 4
-//
-// Description : This include file is designed to contain items useful to all
-// code files and projects, regardless of specific implementation.
-//
-// This code is distributed under the GNU Public License
-// which can be found at http://www.gnu.org/licenses/gpl.txt
-//
-//*****************************************************************************
-
-
-#ifndef AVRLIBDEFS_H
-#define AVRLIBDEFS_H
-
-// Code compatibility to new AVR-libc
-// outb(), inb(), inw(), outw(), BV(), sbi(), cbi(), sei(), cli()
-#ifndef outb
- #define outb(addr, data) addr = (data)
-#endif
-#ifndef inb
- #define inb(addr) (addr)
-#endif
-#ifndef outw
- #define outw(addr, data) addr = (data)
-#endif
-#ifndef inw
- #define inw(addr) (addr)
-#endif
-#ifndef BV
- #define BV(bit) (1<<(bit))
-#endif
-#ifndef cbi
- #define cbi(reg,bit) reg &= ~(BV(bit))
-#endif
-#ifndef sbi
- #define sbi(reg,bit) reg |= (BV(bit))
-#endif
-#ifndef cli
- #define cli() __asm__ __volatile__ ("cli" ::)
-#endif
-#ifndef sei
- #define sei() __asm__ __volatile__ ("sei" ::)
-#endif
-
-// support for individual port pin naming in the mega128
-// see port128.h for details
-#ifdef __AVR_ATmega128__
-// not currently necessary due to inclusion
-// of these defines in newest AVR-GCC
-// do a quick test to see if include is needed
-#ifndef PD0
- #include "port128.h"
-#endif
-#endif
-
-// use this for packed structures
-// (this is seldom necessary on an 8-bit architecture like AVR,
-// but can assist in code portability to AVR)
-#define GNUC_PACKED __attribute__((packed))
-
-// port address helpers
-#define DDR(x) ((x)-1) // address of data direction register of port x
-#define PIN(x) ((x)-2) // address of input register of port x
-
-// MIN/MAX/ABS macros
-#define MIN(a,b) ((a<b)?(a):(b))
-#define MAX(a,b) ((a>b)?(a):(b))
-#define ABS(x) ((x>0)?(x):(-x))
-
-// constants
-#define PI 3.14159265359
-
-#endif
+/*! \file avrlibdefs.h \brief AVRlib global defines and macros. */
+//*****************************************************************************
+//
+// File Name : 'avrlibdefs.h'
+// Title : AVRlib global defines and macros include file
+// Author : Pascal Stang
+// Created : 7/12/2001
+// Revised : 9/30/2002
+// Version : 1.1
+// Target MCU : Atmel AVR series
+// Editor Tabs : 4
+//
+// Description : This include file is designed to contain items useful to all
+// code files and projects, regardless of specific implementation.
+//
+// This code is distributed under the GNU Public License
+// which can be found at http://www.gnu.org/licenses/gpl.txt
+//
+//*****************************************************************************
+
+
+#ifndef AVRLIBDEFS_H
+#define AVRLIBDEFS_H
+
+// Code compatibility to new AVR-libc
+// outb(), inb(), inw(), outw(), BV(), sbi(), cbi(), sei(), cli()
+#ifndef outb
+ #define outb(addr, data) addr = (data)
+#endif
+#ifndef inb
+ #define inb(addr) (addr)
+#endif
+#ifndef outw
+ #define outw(addr, data) addr = (data)
+#endif
+#ifndef inw
+ #define inw(addr) (addr)
+#endif
+#ifndef BV
+ #define BV(bit) (1<<(bit))
+#endif
+#ifndef cbi
+ #define cbi(reg,bit) reg &= ~(BV(bit))
+#endif
+#ifndef sbi
+ #define sbi(reg,bit) reg |= (BV(bit))
+#endif
+#ifndef cli
+ #define cli() __asm__ __volatile__ ("cli" ::)
+#endif
+#ifndef sei
+ #define sei() __asm__ __volatile__ ("sei" ::)
+#endif
+
+// support for individual port pin naming in the mega128
+// see port128.h for details
+#ifdef __AVR_ATmega128__
+// not currently necessary due to inclusion
+// of these defines in newest AVR-GCC
+// do a quick test to see if include is needed
+#ifndef PD0
+ #include "port128.h"
+#endif
+#endif
+
+// use this for packed structures
+// (this is seldom necessary on an 8-bit architecture like AVR,
+// but can assist in code portability to AVR)
+#define GNUC_PACKED __attribute__((packed))
+
+// port address helpers
+#define DDR(x) ((x)-1) // address of data direction register of port x
+#define PIN(x) ((x)-2) // address of input register of port x
+
+// MIN/MAX/ABS macros
+#define MIN(a,b) ((a<b)?(a):(b))
+#define MAX(a,b) ((a>b)?(a):(b))
+#define ABS(x) ((x>0)?(x):(-x))
+
+// constants
+#define PI 3.14159265359
+
+#endif
View
@@ -1,84 +1,84 @@
-/*! \file avrlibtypes.h \brief AVRlib global types and typedefines. */
-//*****************************************************************************
-//
-// File Name : 'avrlibtypes.h'
-// Title : AVRlib global types and typedefines include file
-// Author : Pascal Stang
-// Created : 7/12/2001
-// Revised : 9/30/2002
-// Version : 1.0
-// Target MCU : Atmel AVR series
-// Editor Tabs : 4
-//
-// Description : Type-defines required and used by AVRlib. Most types are also
-// generally useful.
-//
-// This code is distributed under the GNU Public License
-// which can be found at http://www.gnu.org/licenses/gpl.txt
-//
-//*****************************************************************************
-
-
-#ifndef AVRLIBTYPES_H
-#define AVRLIBTYPES_H
-
-#ifndef WIN32
- // true/false defines
- #define FALSE 0
- #define TRUE -1
-#endif
-
-// datatype definitions macros
-typedef unsigned char u08;
-typedef signed char s08;
-typedef unsigned short u16;
-typedef signed short s16;
-typedef unsigned long u32;
-typedef signed long s32;
-typedef unsigned long long u64;
-typedef signed long long s64;
-
-/* use inttypes.h instead
-// C99 standard integer type definitions
-typedef unsigned char uint8_t;
-typedef signed char int8_t;
-typedef unsigned short uint16_t;
-typedef signed short int16_t;
-typedef unsigned long uint32_t;
-typedef signed long int32_t;
-typedef unsigned long uint64_t;
-typedef signed long int64_t;
-*/
-// maximum value that can be held
-// by unsigned data types (8,16,32bits)
-#define MAX_U08 255
-#define MAX_U16 65535
-#define MAX_U32 4294967295
-
-// maximum values that can be held
-// by signed data types (8,16,32bits)
-#define MIN_S08 -128
-#define MAX_S08 127
-#define MIN_S16 -32768
-#define MAX_S16 32767
-#define MIN_S32 -2147483648
-#define MAX_S32 2147483647
-
-#ifndef WIN32
- // more type redefinitions
- typedef unsigned char BOOL;
- typedef unsigned char BYTE;
- typedef unsigned int WORD;
- typedef unsigned long DWORD;
-
- typedef unsigned char UCHAR;
- typedef unsigned int UINT;
- typedef unsigned short USHORT;
- typedef unsigned long ULONG;
-
- typedef char CHAR;
- typedef int INT;
- typedef long LONG;
-#endif
-
-#endif
+/*! \file avrlibtypes.h \brief AVRlib global types and typedefines. */
+//*****************************************************************************
+//
+// File Name : 'avrlibtypes.h'
+// Title : AVRlib global types and typedefines include file
+// Author : Pascal Stang
+// Created : 7/12/2001
+// Revised : 9/30/2002
+// Version : 1.0
+// Target MCU : Atmel AVR series
+// Editor Tabs : 4
+//
+// Description : Type-defines required and used by AVRlib. Most types are also
+// generally useful.
+//
+// This code is distributed under the GNU Public License
+// which can be found at http://www.gnu.org/licenses/gpl.txt
+//
+//*****************************************************************************
+
+
+#ifndef AVRLIBTYPES_H
+#define AVRLIBTYPES_H
+
+#ifndef WIN32
+ // true/false defines
+ #define FALSE 0
+ #define TRUE -1
+#endif
+
+// datatype definitions macros
+typedef unsigned char u08;
+typedef signed char s08;
+typedef unsigned short u16;
+typedef signed short s16;
+typedef unsigned long u32;
+typedef signed long s32;
+typedef unsigned long long u64;
+typedef signed long long s64;
+
+/* use inttypes.h instead
+// C99 standard integer type definitions
+typedef unsigned char uint8_t;
+typedef signed char int8_t;
+typedef unsigned short uint16_t;
+typedef signed short int16_t;
+typedef unsigned long uint32_t;
+typedef signed long int32_t;
+typedef unsigned long uint64_t;
+typedef signed long int64_t;
+*/
+// maximum value that can be held
+// by unsigned data types (8,16,32bits)
+#define MAX_U08 255
+#define MAX_U16 65535
+#define MAX_U32 4294967295
+
+// maximum values that can be held
+// by signed data types (8,16,32bits)
+#define MIN_S08 -128
+#define MAX_S08 127
+#define MIN_S16 -32768
+#define MAX_S16 32767
+#define MIN_S32 -2147483648
+#define MAX_S32 2147483647
+
+#ifndef WIN32
+ // more type redefinitions
+ typedef unsigned char BOOL;
+ typedef unsigned char BYTE;
+ typedef unsigned int WORD;
+ typedef unsigned long DWORD;
+
+ typedef unsigned char UCHAR;
+ typedef unsigned int UINT;
+ typedef unsigned short USHORT;
+ typedef unsigned long ULONG;
+
+ typedef char CHAR;
+ typedef int INT;
+ typedef long LONG;
+#endif
+
+#endif
Oops, something went wrong.

0 comments on commit 6df03e8

Please sign in to comment.