aboutsummaryrefslogtreecommitdiff
path: root/src/sample/io_sample/IR/Rx/io_ir.h
blob: 5bd5faa8c400b09e589593577dc425c6be57c070 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
*********************************************************************************************************
*               Copyright(c) 2018, Realtek Semiconductor Corporation. All rights reserved.
*********************************************************************************************************
* @file     io_ir.h
* @brief
* @details
* @author   yuan
* @date     2018-12-07
* @version  v1.0
*********************************************************************************************************
*/

#ifndef __IO_IR_H
#define __IO_IR_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "rtl876x_ir.h"
#include "rtl876x_nvic.h"
#include "rtl876x_pinmux.h"
#include "rtl876x_rcc.h"

#include "board.h"

#include "app_msg.h"


/* Defines ------------------------------------------------------------------*/
#define IR_DATA_SIZE_MAX                100

#define IR_RX_FIFO_THR_LEVEL            30

///**  @brief IO subtype definitions for @ref IO_MSG_TYPE_IR type */
//typedef enum
//{
//    IO_MSG_IR_RX_RF_LEVEL,
//    IO_MSG_IR_RX_CNT_THR,
//} T_IO_MSG_TYPE_IR;

/**
  * @brief  IR data structure definition
  */
typedef struct
{
    /* Unit of carrierFreq is KHz */
    uint8_t     CarrierFreq;
    uint32_t    DataBuf[IR_DATA_SIZE_MAX];
    uint16_t    DataLen;
} IR_Data_TypeDef;

void global_data_ir_init(void);
void board_ir_init(void);
void driver_ir_init(void);
void ir_demo(void);
void io_handle_ir_msg(T_IO_MSG *io_ir_msg);


#ifdef __cplusplus
}
#endif

#endif