]> cloudbase.mooo.com Git - irmp.git/blobdiff - irmpsystem.h
Version 2.5.0: added SPEAKER protocol (IRMP)
[irmp.git] / irmpsystem.h
index 395772b6b0abcb866a36e8fe29ea04bf39661a07..b8a9b9a98341ffe8fa638ba4b01908cf9928a9bf 100644 (file)
@@ -1,9 +1,9 @@
 /*---------------------------------------------------------------------------------------------------------------------------------------------------\r
  * irmpsystem.h - system specific includes and defines\r
  *\r
- * Copyright (c) 2009-2012 Frank Meyer - frank(at)fli4l.de\r
+ * Copyright (c) 2009-2013 Frank Meyer - frank(at)fli4l.de\r
  *\r
- * $Id: irmpsystem.h,v 1.5 2012/05/23 12:26:26 fm Exp $\r
+ * $Id: irmpsystem.h,v 1.10 2014/02/19 12:57:36 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
 #  include <stm32f4xx.h>\r
 #  define ARM_STM32\r
 #  define ARM_STM32F4XX\r
-#elif defined(unix) || defined(WIN32)                                               // Unix/Linux or Windows\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) || defined(__APPLE__)                         // Unix/Linux or Windows or Apple\r
 #  define UNIX_OR_WINDOWS\r
 #else\r
 #  define ATMEL_AVR                                                                 // ATMEL AVR\r
 #ifdef UNIX_OR_WINDOWS                                                              // Analyze on Unix/Linux or Windows\r
 #  include <stdio.h>\r
 #  include <stdlib.h>\r
-#  include <stdint.h>\r
 #  define F_CPU 8000000L\r
 #  define ANALYZE\r
-#  define DEBUG\r
+#  ifdef unix\r
+#    include <stdint.h>\r
+#  else\r
+typedef unsigned char                   uint8_t;\r
+typedef unsigned short                  uint16_t;\r
+#  endif\r
 #endif\r
 \r
+\r
 #if defined(ATMEL_AVR)\r
 #  include <stdint.h>\r
 #  include <stdio.h>\r
 #  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