added support for STM8

This commit is contained in:
2018-01-19 19:21:28 +08:00
parent e4624cc2dd
commit e655ad9d20
10 changed files with 57 additions and 12 deletions

View File

@@ -19,6 +19,9 @@ extern "C"
#include "ir_decode.h"
#define MIN_TAG_LENGTH_TYPE_1 4
#define MIN_TAG_LENGTH_TYPE_2 6
INT8 apply_power(t_remote_ac_status ac_status, UINT8 function_code);
INT8 apply_mode(t_remote_ac_status ac_status, UINT8 function_code);

View File

@@ -357,7 +357,7 @@ typedef struct tag_head
{
UINT16 tag;
UINT16 len;
unsigned short offset;
UINT16 offset;
UINT8 *p_data;
} t_tag_head;

View File

@@ -29,6 +29,10 @@ extern "C"
#define TRUE 1
#define FALSE 0
#define FORMAT_HEX 16
#define FORMAT_DECIMAL 10
typedef unsigned char UINT8;
typedef signed char INT8;
typedef unsigned short UINT16;
@@ -39,12 +43,12 @@ typedef int BOOL;
void noprint(const char *fmt, ...);
#if !defined BOARD_CC26XX
#define ir_malloc(A) malloc(A)
#define ir_free(A) free(A)
#else
#if defined BOARD_CC26XX
#define ir_malloc(A) ICall_malloc(A)
#define ir_free(A) ICall_free(A)
#else
#define ir_malloc(A) malloc(A)
#define ir_free(A) free(A)
#endif
#define ir_memcpy(A, B, C) memcpy(A, B, C)

View File

@@ -73,7 +73,7 @@ typedef struct ir_data
UINT8 index;
} t_ir_data;
#if !defined BOARD_51
#if !defined BOARD_51 && !defined BOARD_STM8
#pragma pack(1)
#endif
typedef struct ir_cycles
@@ -83,7 +83,7 @@ typedef struct ir_cycles
UINT16 space;
} t_ir_cycles;
#if !defined BOARD_51
#if !defined BOARD_51 && !defined BOARD_STM8
#pragma pack()
#endif

View File

@@ -28,6 +28,8 @@ extern void string_to_hex_common(UINT8 *p, UINT8 *hex_data, UINT16 len);
extern BOOL is_in(const UINT8 *array, UINT8 value, UINT8 len);
extern void hex_byte_to_double_char(char *dest, UINT8 length, UINT8 src);
#ifdef __cplusplus
}
#endif