X-Git-Url: http://cloudbase.mooo.com/gitweb/irmp.git/blobdiff_plain/08f2dd9d18830e4671dd99ac04569c6dd9895b98..7fe8188d6871371baf83a08d1ab42c094525c04b:/irmpsystem.h diff --git a/irmpsystem.h b/irmpsystem.h index 395772b..575bfda 100644 --- a/irmpsystem.h +++ b/irmpsystem.h @@ -1,9 +1,9 @@ /*--------------------------------------------------------------------------------------------------------------------------------------------------- * irmpsystem.h - system specific includes and defines * - * Copyright (c) 2009-2012 Frank Meyer - frank(at)fli4l.de + * Copyright (c) 2009-2014 Frank Meyer - frank(at)fli4l.de * - * $Id: irmpsystem.h,v 1.5 2012/05/23 12:26:26 fm Exp $ + * $Id: irmpsystem.h,v 1.13 2014/07/21 08:58:58 fm Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,6 +21,9 @@ #if defined(__18CXX) // Microchip PIC C18 compiler # define PIC_C18 +#elif defined(__XC8) // PIC XC8 compiler +# include +# define PIC_C18 #elif defined(__PCM__) || defined(__PCB__) || defined(__PCH__) // CCS PIC compiler # define PIC_CCS #elif defined(STM32L1XX_MD) || defined(STM32L1XX_MDP) || defined(STM32L1XX_HD) // ARM STM32 @@ -38,7 +41,10 @@ # include # define ARM_STM32 # define ARM_STM32F4XX -#elif defined(unix) || defined(WIN32) // Unix/Linux or Windows +#elif defined(TARGET_IS_BLIZZARD_RA2) // TI Stellaris (tested on Stellaris Launchpad with Code Composer Studio) +# define STELLARIS_ARM_CORTEX_M4 +# define F_CPU (SysCtlClockGet()) +#elif defined(unix) || defined(WIN32) || defined(__APPLE__) // Unix/Linux or Windows or Apple # define UNIX_OR_WINDOWS #else # define ATMEL_AVR // ATMEL AVR @@ -49,12 +55,17 @@ #ifdef UNIX_OR_WINDOWS // Analyze on Unix/Linux or Windows # include # include -# include # define F_CPU 8000000L # define ANALYZE -# define DEBUG +# ifdef unix +# include +# else +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +# endif #endif + #if defined(ATMEL_AVR) # include # include @@ -68,20 +79,38 @@ # define IRSND_OC0 3 // OC0 # define IRSND_OC0A 4 // OC0A # define IRSND_OC0B 5 // OC0B +#elif defined(STELLARIS_ARM_CORTEX_M4) +# include "inc/hw_ints.h" +# include "inc/hw_memmap.h" +# include "inc/hw_types.h" +# include "inc/hw_gpio.h" +# include "driverlib/fpu.h" +# include "driverlib/sysctl.h" +# include "driverlib/interrupt.h" +# include "driverlib/gpio.h" +# include "driverlib/rom.h" +# include "driverlib/systick.h" +# include "driverlib/pin_map.h" +# include "driverlib/timer.h" +# define PROGMEM volatile +# define memcpy_P memcpy +# define APP_SYSTICKS_PER_SEC 32 #else # define PROGMEM # define memcpy_P memcpy #endif -#if defined(PIC_CCS) || defined(PIC_C18) || defined(ARM_STM32) +#if defined(PIC_CCS) || defined(PIC_C18) || defined(ARM_STM32) || defined(STELLARIS_ARM_CORTEX_M4) typedef unsigned char uint8_t; typedef unsigned short uint16_t; #endif -#if defined (PIC_C18) +#if defined (PIC_C18) // PIC C18 or XC8 compiler # include // main PIC18 h file +#ifndef __XC8 # include // timer lib # include // pwm lib +#endif # define IRSND_PIC_CCP1 1 // PIC C18 RC2 = PWM1 module # define IRSND_PIC_CCP2 2 // PIC C18 RC1 = PWM2 module #endif