43#define CHIP_NAME "NEC IR REMOTE"
44#define MANUFACTURER_NAME "NEC"
45#define SUPPLY_VOLTAGE_MIN 2.7f
46#define SUPPLY_VOLTAGE_MAX 5.5f
47#define MAX_CURRENT 1.5f
48#define TEMPERATURE_MIN -40.0f
49#define TEMPERATURE_MAX 125.0f
50#define DRIVER_VERSION 1000
55#define IR_REMOTE_CHECK_START_HIGH 9000
56#define IR_REMOTE_CHECK_START_LOW 4500
57#define IR_REMOTE_CHECK_DATA0_HIGH 560
58#define IR_REMOTE_CHECK_DATA0_LOW 560
59#define IR_REMOTE_CHECK_DATA1_HIGH 560
60#define IR_REMOTE_CHECK_DATA1_LOW 1680
61#define IR_REMOTE_CHECK_DATA_0_1_EDGE 1000
62#define IR_REMOTE_CHECK_STOP 560
63#define IR_REMOTE_CHECK_REPEAT 2250
74static inline uint8_t a_check_frame(uint16_t check, uint16_t t)
98 for (i = 0; i < len; i++)
102 diff = (int64_t)((int64_t)handle->
decode[i + 1].
t.
s -
103 (int64_t)handle->
decode[i].
t.
s) * 1000000 +
104 (int64_t)((int64_t)handle->
decode[i + 1].
t.
us -
171 for (i = 0; i < len; i++)
175 diff = (int64_t)((int64_t)handle->
decode[i + 1].
t.
s -
176 (int64_t)handle->
decode[i].
t.
s) * 1000000 +
177 (int64_t)((int64_t)handle->
decode[i + 1].
t.
us -
208 for (i = 0; i < 8; i++)
256 for (i = 0; i < 8; i++)
319 for (i = 0; i < 8; i++)
364 for (i = 0; i < 8; i++)
472 handle->
debug_print(
"ir_remote: timestamp read failed.\n");
476 diff = (int64_t)((int64_t)t.
s -
479 if (diff - (int64_t)200000L >= 0)
494 diff = (int64_t)((int64_t)handle->
decode[2].
t.
s -
495 (int64_t)handle->
decode[1].
t.
s) * 1000000 +
496 (int64_t)((int64_t)handle->
decode[2].
t.
us -
500 a_ir_remote_nec_decode(handle);
505 diff = (int64_t)((int64_t)handle->
decode[2].
t.
s -
506 (int64_t)handle->
decode[1].
t.
s) * 1000000 +
507 (int64_t)((int64_t)handle->
decode[2].
t.
us -
511 a_ir_remote_nec_repeat_decode(handle);
543 handle->
debug_print(
"ir_remote: timestamp_read is null.\n");
549 handle->
debug_print(
"ir_remote: delay_ms is null.\n");
555 handle->
debug_print(
"ir_remote: receive_callback is null.\n");
563 handle->
debug_print(
"ir_remote: timestamp read failed.\n");
#define IR_REMOTE_CHECK_DATA1_HIGH
#define IR_REMOTE_CHECK_START_LOW
#define IR_REMOTE_CHECK_DATA_0_1_EDGE
#define SUPPLY_VOLTAGE_MAX
#define IR_REMOTE_CHECK_DATA1_LOW
#define MANUFACTURER_NAME
#define SUPPLY_VOLTAGE_MIN
#define IR_REMOTE_CHECK_START_HIGH
frame check definition
#define IR_REMOTE_CHECK_STOP
#define IR_REMOTE_CHECK_REPEAT
#define CHIP_NAME
chip information definition
#define IR_REMOTE_CHECK_DATA0_LOW
driver ir remote header file
#define IR_REMOTE_MAX_RANGE
ir_remote max range definition
uint8_t ir_remote_irq_handler(ir_remote_handle_t *handle)
irq handler
uint8_t ir_remote_init(ir_remote_handle_t *handle)
initialize the chip
uint8_t ir_remote_info(ir_remote_info_t *info)
get chip's information
struct ir_remote_info_s ir_remote_info_t
ir_remote information structure definition
struct ir_remote_handle_s ir_remote_handle_t
ir_remote handle structure definition
uint8_t ir_remote_deinit(ir_remote_handle_t *handle)
close the chip
struct ir_remote_time_s ir_remote_time_t
ir_remote time structure definition
struct ir_remote_s ir_remote_t
ir_remote structure definition
@ IR_REMOTE_STATUS_REPEAT
@ IR_REMOTE_STATUS_FRAME_INVALID
@ IR_REMOTE_STATUS_CMD_ERR
@ IR_REMOTE_STATUS_ADDR_ERR
ir_remote_decode_t decode[128]
void(* delay_ms)(uint32_t ms)
void(* debug_print)(const char *const fmt,...)
uint8_t(* timestamp_read)(ir_remote_time_t *t)
void(* receive_callback)(ir_remote_t *data)
ir_remote_time_t last_time
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v