updated all example references
This commit is contained in:
@@ -37,6 +37,8 @@ typedef signed int INT;
|
||||
typedef unsigned int UINT;
|
||||
typedef int BOOL;
|
||||
|
||||
void noprint(const char *fmt, ...);
|
||||
|
||||
#if !defined BOARD_CC26XX
|
||||
#define ir_malloc(A) malloc(A)
|
||||
#define ir_free(A) free(A)
|
||||
@@ -48,7 +50,11 @@ typedef int BOOL;
|
||||
#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)
|
||||
#define ir_printf printf
|
||||
#else
|
||||
#define ir_printf noprint
|
||||
#endif
|
||||
#define USER_DATA_SIZE 1636
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -61,6 +61,11 @@ static UINT16 ir_tv_lib_control(UINT8 key, UINT16 *l_user_data);
|
||||
static INT8 ir_tv_lib_close();
|
||||
|
||||
|
||||
void noprint(const char *fmt, ...)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// pubic function definitions
|
||||
|
||||
INT8 ir_file_open(const UINT8 category, const UINT8 sub_category, const char* file_name)
|
||||
@@ -111,6 +116,7 @@ INT8 ir_file_open(const UINT8 category, const UINT8 sub_category, const char* fi
|
||||
INT8 ir_binary_open(const UINT8 category, const UINT8 sub_category, UINT8* binary, UINT16 binary_length)
|
||||
{
|
||||
INT8 ret = IR_DECODE_SUCCEEDED;
|
||||
|
||||
if (category == IR_CATEGORY_AC)
|
||||
{
|
||||
ir_binary_type = IR_TYPE_STATUS;
|
||||
@@ -352,11 +358,15 @@ static UINT16 ir_ac_lib_control(remote_ac_status_t ac_status, UINT16 *user_data,
|
||||
|
||||
time_length = create_ir_frame();
|
||||
|
||||
#if defined BOARD_PC
|
||||
#if (defined BOARD_PC)
|
||||
#if (defined BOARD_PC_JNI)
|
||||
ir_printf("code count = %d\n", context->code_cnt);
|
||||
#else
|
||||
for (i = 0; i < context->code_cnt; i++)
|
||||
{
|
||||
ir_printf("%d,", context->time[i]);
|
||||
}
|
||||
#endif
|
||||
ir_printf("\n");
|
||||
#endif
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ static BOOL get_ir_protocol(UINT8 encode_type)
|
||||
|
||||
/* cycles number */
|
||||
prot_cycles_num = pbuffer->data + pbuffer->offset;
|
||||
|
||||
if (encode_type == 0)
|
||||
{
|
||||
cycles_num_size = 8; /* "BOOT", "STOP", "SEP", "ONE", "ZERO", "FLIP", "TWO", "THREE" */
|
||||
@@ -190,6 +191,7 @@ static void print_ir_time(ir_data_t *data, UINT8 key_index, UINT16 *ir_time)
|
||||
|
||||
if (NULL == data || NULL == ir_time)
|
||||
{
|
||||
ir_printf("data or ir_time is null\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -198,11 +200,13 @@ static void print_ir_time(ir_data_t *data, UINT8 key_index, UINT16 *ir_time)
|
||||
|
||||
if (prot_cycles_num[IRDA_ONE] != 1 || prot_cycles_num[IRDA_ZERO] != 1)
|
||||
{
|
||||
ir_printf("logical 1 or 0 is invalid\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (time_index >= USER_DATA_SIZE)
|
||||
{
|
||||
ir_printf("time index exceeded\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -210,12 +214,14 @@ static void print_ir_time(ir_data_t *data, UINT8 key_index, UINT16 *ir_time)
|
||||
{
|
||||
if (pcycles == NULL)
|
||||
{
|
||||
ir_printf("pcycles is null\n");
|
||||
return;
|
||||
}
|
||||
|
||||
cycles_num = prot_cycles_num[data->index];
|
||||
if (cycles_num > 5)
|
||||
{
|
||||
ir_printf("cycles number exceeded\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user