]> cloudbase.mooo.com Git - irmp.git/blobdiff - irmpsystem.h
Version 2.6.2: port to PIC 12F1840
[irmp.git] / irmpsystem.h
index 4d822861b014cf77f5b5d9dc79a2abec6c65cb2b..575bfdaa44158799fc7500c1eb126130024d84c4 100644 (file)
@@ -1,9 +1,9 @@
 /*---------------------------------------------------------------------------------------------------------------------------------------------------\r
  * irmpsystem.h - system specific includes and defines\r
  *\r
- * Copyright (c) 2009-2013 Frank Meyer - frank(at)fli4l.de\r
+ * Copyright (c) 2009-2014 Frank Meyer - frank(at)fli4l.de\r
  *\r
- * $Id: irmpsystem.h,v 1.8 2013/01/17 07:33:13 fm Exp $\r
+ * $Id: irmpsystem.h,v 1.13 2014/07/21 08:58:58 fm Exp $\r
  *\r
  * This program is free software; you can redistribute it and/or modify\r
  * it under the terms of the GNU General Public License as published by\r
@@ -21,6 +21,9 @@
 \r
 #if defined(__18CXX)                                                                // Microchip PIC C18 compiler\r
 #  define PIC_C18\r
+#elif defined(__XC8)                                                                // PIC XC8 compiler\r
+#  include <xc.h>\r
+#  define PIC_C18\r
 #elif defined(__PCM__) || defined(__PCB__) || defined(__PCH__)                      // CCS PIC compiler\r
 #  define PIC_CCS\r
 #elif defined(STM32L1XX_MD) || defined(STM32L1XX_MDP) || defined(STM32L1XX_HD)      // ARM STM32\r
@@ -41,7 +44,7 @@
 #elif defined(TARGET_IS_BLIZZARD_RA2)                                                                                           // TI Stellaris (tested on Stellaris Launchpad with Code Composer Studio)\r
 #  define STELLARIS_ARM_CORTEX_M4\r
 #  define F_CPU (SysCtlClockGet())\r
-#elif defined(unix) || defined(WIN32)                                               // Unix/Linux or Windows\r
+#elif defined(unix) || defined(WIN32) || defined(__APPLE__)                         // Unix/Linux or Windows or Apple\r
 #  define UNIX_OR_WINDOWS\r
 #else\r
 #  define ATMEL_AVR                                                                 // ATMEL AVR\r
@@ -54,7 +57,6 @@
 #  include <stdlib.h>\r
 #  define F_CPU 8000000L\r
 #  define ANALYZE\r
-#  define DEBUG\r
 #  ifdef unix\r
 #    include <stdint.h>\r
 #  else\r
@@ -103,10 +105,12 @@ typedef unsigned char                   uint8_t;
 typedef unsigned short                  uint16_t;\r
 #endif\r
 \r
-#if defined (PIC_C18)\r
+#if defined (PIC_C18)                                                               // PIC C18 or XC8 compiler\r
 #  include <p18cxxx.h>                                                              // main PIC18 h file\r
+#ifndef __XC8\r
 #  include <timers.h>                                                               // timer lib\r
 #  include <pwm.h>                                                                  // pwm lib\r
+#endif\r
 #  define IRSND_PIC_CCP1                1                                           // PIC C18 RC2 = PWM1 module\r
 #  define IRSND_PIC_CCP2                2                                           // PIC C18 RC1 = PWM2 module\r
 #endif\r