]> cloudbase.mooo.com Git - irmp.git/blobdiff - irmpsystem.h
Version 2.3.3: port to Stellaris ARM Cortex M4
[irmp.git] / irmpsystem.h
index 1e2e4df06852fdd1c414c95bada4280d5ee51ff6..b73d81f9918f3ac56554ab3caeaad08c2e5d322a 100644 (file)
@@ -3,7 +3,7 @@
  *\r
  * Copyright (c) 2009-2012 Frank Meyer - frank(at)fli4l.de\r
  *\r
- * $Id: irmpsystem.h,v 1.6 2012/05/23 14:02:45 fm Exp $\r
+ * $Id: irmpsystem.h,v 1.7 2012/11/18 17:51:26 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
@@ -38,6 +38,9 @@
 #  include <stm32f4xx.h>\r
 #  define ARM_STM32\r
 #  define ARM_STM32F4XX\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
 #  define UNIX_OR_WINDOWS\r
 #else\r
@@ -74,12 +77,28 @@ typedef unsigned short                  uint16_t;
 #  define IRSND_OC0                     3       // OC0\r
 #  define IRSND_OC0A                    4       // OC0A\r
 #  define IRSND_OC0B                    5       // OC0B\r
+#elif defined(STELLARIS_ARM_CORTEX_M4)\r
+#  include "inc/hw_ints.h"\r
+#  include "inc/hw_memmap.h"\r
+#  include "inc/hw_types.h"\r
+#  include "inc/hw_gpio.h"\r
+#  include "driverlib/fpu.h"\r
+#  include "driverlib/sysctl.h"\r
+#  include "driverlib/interrupt.h"\r
+#  include "driverlib/gpio.h"\r
+#  include "driverlib/rom.h"\r
+#  include "driverlib/systick.h"\r
+#  include "driverlib/pin_map.h"\r
+#  include "driverlib/timer.h"\r
+#  define PROGMEM volatile\r
+#  define memcpy_P memcpy\r
+#  define APP_SYSTICKS_PER_SEC          32\r
 #else\r
 #  define PROGMEM\r
 #  define memcpy_P                      memcpy\r
 #endif\r
 \r
-#if defined(PIC_CCS) || defined(PIC_C18) || defined(ARM_STM32)\r
+#if defined(PIC_CCS) || defined(PIC_C18) || defined(ARM_STM32) || defined(STELLARIS_ARM_CORTEX_M4)\r
 typedef unsigned char                   uint8_t;\r
 typedef unsigned short                  uint16_t;\r
 #endif\r