/*---------------------------------------------------------------------------------------------------------------------------------------------------\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
\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
#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
# include <stdlib.h>\r
# define F_CPU 8000000L\r
# define ANALYZE\r
-# define DEBUG\r
# ifdef unix\r
# include <stdint.h>\r
# else\r
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