]> cloudbase.mooo.com Git - irmp.git/blobdiff - irmpsystem.h
Version 2.9.6: added support for STM8 mikrocontroller
[irmp.git] / irmpsystem.h
index 41cd3440ce9d6afcce890c987a53498feb575580..07e4ef1813e3a43e840c60126afb67e5da5f7af8 100644 (file)
@@ -3,7 +3,7 @@
  *\r
  * Copyright (c) 2009-2015 Frank Meyer - frank(at)fli4l.de\r
  *\r
- * $Id: irmpsystem.h,v 1.18 2015/05/18 10:51:07 fm Exp $\r
+ * $Id: irmpsystem.h,v 1.19 2015/11/10 08:39:28 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
@@ -43,6 +43,8 @@
 #  include <stm32f4xx.h>\r
 #  define ARM_STM32\r
 #  define ARM_STM32F4XX\r
+#elif defined(__SDCC_stm8)                                                          // STM8\r
+#  define SDCC_STM8\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
@@ -116,6 +118,15 @@ typedef unsigned short                  uint16_t;
 #  define PROGMEM\r
 #  define memcpy_P                      memcpy\r
 \r
+#elif defined(SDCC_STM8)\r
+\r
+#  include "stm8s.h"\r
+#  define PROGMEM\r
+#  define memcpy_P                      memcpy\r
+#  define __attribute__(x)\r
+#  define uint_fast8_t                  uint8_t\r
+#  define uint_fast16_t                 uint16_t\r
+\r
 #else\r
 \r
 #  define PROGMEM\r