]> cloudbase.mooo.com Git - irmp.git/blobdiff - irmpsystem.h
Version 2.9.7: added port to to ESP8266 and TEENSY, added PANASONIC protocol, added...
[irmp.git] / irmpsystem.h
index 07e4ef1813e3a43e840c60126afb67e5da5f7af8..afa3c8c9e69f7f5a80a2f99d855038e1a290cc20 100644 (file)
@@ -3,7 +3,7 @@
  *\r
  * Copyright (c) 2009-2015 Frank Meyer - frank(at)fli4l.de\r
  *\r
- * $Id: irmpsystem.h,v 1.19 2015/11/10 08:39:28 fm Exp $\r
+ * $Id: irmpsystem.h,v 1.20 2015/11/17 13:51:45 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
 #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(__xtensa__)\r
+#  include "ets_sys.h"\r
+#  include "osapi.h"\r
+#  include "gpio.h"\r
+#  include "os_type.h"\r
+#  include "c_types.h" \r
+#  define uint_fast8_t uint8_t\r
+#  define uint_fast16_t uint16_t\r
+#elif defined(TEENSYDUINO) && (defined(__MK20DX256__) || defined(__MK20DX128__))    // Teensy 3.x (tested on Teensy 3.1 in Arduino 1.6.5 / Teensyduino 1.2.5)\r
+#  include <core_pins.h>\r
+#  define TEENSY_ARM_CORTEX_M4\r
 #elif defined(unix) || defined(WIN32) || defined(__APPLE__)                         // Unix/Linux or Windows or Apple\r
 #  define UNIX_OR_WINDOWS\r
 #else\r
@@ -127,8 +138,11 @@ typedef unsigned short                  uint16_t;
 #  define uint_fast8_t                  uint8_t\r
 #  define uint_fast16_t                 uint16_t\r
 \r
-#else\r
+#elif defined(TEENSY_ARM_CORTEX_M4)\r
+#  define PROGMEM\r
+#  define memcpy_P                      memcpy\r
 \r
+#else\r
 #  define PROGMEM\r
 #  define memcpy_P                      memcpy\r
 \r
@@ -156,10 +170,10 @@ typedef unsigned short                  uint16_t;
 \r
 typedef struct __attribute__ ((__packed__))\r
 {\r
-  uint8_t                               protocol;                                   // protocol, e.g. NEC_PROTOCOL\r
-  uint16_t                              address;                                    // address\r
-  uint16_t                              command;                                    // command\r
-  uint8_t                               flags;                                      // flags, e.g. repetition\r
+    uint8_t                            protocol;                                   // protocol, e.g. NEC_PROTOCOL\r
+    uint16_t                            address;                                    // address\r
+    uint16_t                            command;                                    // command\r
+    uint8_t                             flags;                                      // flags, e.g. repetition\r
 } IRMP_DATA;\r
 \r
 #endif // _IRMPSYSTEM_H_\r