1. fixed potential memory leak issue for ac frame parsing algorithm 2. changed decode API, embedded 'change_wind_direction' into ac_status (not compatible with lower versions) 3. changed CMakeLists.txt
71 lines
1.6 KiB
C
71 lines
1.6 KiB
C
/**************************************************************************************
|
|
Filename: ir_defs.h
|
|
Revised: Date: 2016-10-26
|
|
Revision: Revision: 1.0
|
|
|
|
Description: This file provides algorithms for IR decode
|
|
|
|
Revision log:
|
|
* 2016-10-01: created by strawmanbobi
|
|
**************************************************************************************/
|
|
|
|
#ifndef _IR_DEFS_H
|
|
#define _IR_DEFS_H
|
|
|
|
#define IR_DECODE_LIB_VER "1.5.1"
|
|
|
|
#if defined (BOARD_PC)
|
|
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
|
|
#pragma ide diagnostic ignored "OCUnusedMacroInspection"
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#if defined BOARD_ANDROID
|
|
#include <android/log.h>
|
|
#define LOG_TAG "ir_decode"
|
|
#endif
|
|
|
|
#define TRUE 1
|
|
#define FALSE 0
|
|
|
|
#define FORMAT_HEX 16
|
|
#define FORMAT_DECIMAL 10
|
|
|
|
// #define USE_DYNAMIC_TAG 1
|
|
|
|
#if defined USE_DYNAMIC_TAG
|
|
#include <stdlib.h>
|
|
#endif
|
|
|
|
typedef unsigned char UINT8;
|
|
typedef signed char INT8;
|
|
typedef unsigned short UINT16;
|
|
typedef signed short INT16;
|
|
typedef signed int INT;
|
|
typedef unsigned int UINT;
|
|
typedef int BOOL;
|
|
|
|
void noprint(const char *fmt, ...);
|
|
|
|
#define ir_malloc(A) malloc(A)
|
|
#define ir_free(A) free(A)
|
|
|
|
#define ir_memcpy(A, B, C) memcpy(A, B, C)
|
|
#define ir_memset(A, B, C) memset(A, B, C)
|
|
#define ir_strlen(A) strlen(A)
|
|
#if ((defined BOARD_PC) || (defined BOARD_PC_JNI)) && (defined DEBUG)
|
|
#define ir_printf(...) do { printf(__VA_ARGS__); fflush(stdout); } while(0)
|
|
#else
|
|
#define ir_printf noprint
|
|
#endif
|
|
#define USER_DATA_SIZE 1636
|
|
// #define USER_DATA_SIZE 4096
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif //_IR_DEFS_H
|