X-Git-Url: http://cloudbase.mooo.com/gitweb/irmp.git/blobdiff_plain/ea29682a628ac3c4d30a4c34a30a00f01c3fb0bd..30d1689ddd3c91f22ee9f79ae4cd6c897b7badbb:/irmpsystem.h diff --git a/irmpsystem.h b/irmpsystem.h index cef563b..25bacb2 100644 --- a/irmpsystem.h +++ b/irmpsystem.h @@ -1,9 +1,9 @@ /*--------------------------------------------------------------------------------------------------------------------------------------------------- * irmpsystem.h - system specific includes and defines * - * Copyright (c) 2009-2015 Frank Meyer - frank(at)fli4l.de + * Copyright (c) 2009-2016 Frank Meyer - frank(at)fli4l.de * - * $Id: irmpsystem.h,v 1.22 2016/01/12 11:53:34 fm Exp $ + * $Id: irmpsystem.h,v 1.25 2016/12/19 09:01:41 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 @@ -48,12 +48,13 @@ #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(__xtensa__) +#elif defined(__xtensa__) // ESP8266 (Arduino) +# include "Arduino.h" # include "ets_sys.h" # include "osapi.h" # include "gpio.h" # include "os_type.h" -# include "c_types.h" +# include "c_types.h" # define uint_fast8_t uint8_t # define uint_fast16_t uint16_t #elif defined(TEENSYDUINO) && (defined(__MK20DX256__) || defined(__MK20DX128__)) // Teensy 3.x (tested on Teensy 3.1 in Arduino 1.6.5 / Teensyduino 1.2.5) @@ -145,6 +146,10 @@ typedef unsigned short uint16_t; # define PROGMEM # define memcpy_P memcpy +#elif defined(__xtensa__) +# define PROGMEM +# define memcpy_P memcpy + #elif defined(__MBED__) # define PROGMEM # define memcpy_P memcpy @@ -158,6 +163,8 @@ typedef unsigned short uint16_t; #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; +typedef unsigned char uint_fast8_t; +typedef unsigned short uint_fast16_t; #endif #if defined (PIC_C18) // PIC C18 or XC8 compiler @@ -175,7 +182,13 @@ typedef unsigned short uint16_t; # define FALSE 0 #endif -typedef struct __attribute__ ((__packed__)) +#if defined(PIC_C18) +#define IRMP_PACKED_STRUCT +#else +#define IRMP_PACKED_STRUCT __attribute__ ((__packed__)) +#endif + +typedef struct IRMP_PACKED_STRUCT { uint8_t protocol; // protocol, e.g. NEC_PROTOCOL uint16_t address; // address