Nano100BN Series BSP  V3.03.002
The Board Support Package for Nano100BN Series
NuEdu-Basic01_IrDA_NEC.h
Go to the documentation of this file.
1 /**************************************************************************/
13 #ifndef __NuEdu_Basic01_IrDA_NEC_H__
14 #define __NuEdu_Basic01_IrDA_NEC_H__
15 
28 #define Percent 0.04
30 #define MaxValue 0xFFFF
31 
32 #define IR_LDC_MAX (13460 * (1 + Percent))
33 #define IR_LDC_MIN (13460 * (1 - Percent))
34 // Repeater code range
35 #define IR_RPC_MAX (11280 * (1 + Percent))
36 #define IR_RPC_MIN (11280 * (1 - Percent))
37 // Bit = 1 range
38 #define IR_BIT_1_MAX (2236 * (1 + Percent))
39 #define IR_BIT_1_MIN (2236 * (1 - Percent))
40 // Bit = 0 range
41 #define IR_BIT_0_MAX (1120 * (1 + Percent))
42 #define IR_BIT_0_MIN (1120 * (1 - Percent))
43 
45 
46 typedef void (*IrDA_Code_Exe)(volatile uint8_t* IR_CODE);
47 void SendNEC(uint8_t* data);
48 void IrDA_NEC_TxRx_Init(IrDA_Code_Exe pfnIrDA_Code_Exe);
49 void IrDa_NEC_Rx(uint32_t u32Time);
50 
51 
52  /* end of group Nano130_Basic01_FUNCTIONS IrDA NEC Exported Functions */
54  /* end of group NuEdu-SDK-Nano130_Basic01 Nano130_Basic01 Library */
56  /* end of group NANO100_Library NANO100 Library */
58 
59 #endif//__NuEdu_Basic01_IrDA_NEC_H__
60 /*** (C) COPYRIGHT 2013-2014 Nuvoton Technology Corp. ***/
void SendNEC(uint8_t *data)
This function is used to transmit IrDA NEC waveform through PC 15 (PWM1_CH3)
void IrDA_NEC_TxRx_Init(IrDA_Code_Exe pfnIrDA_Code_Exe)
This function is used to initiate PWM for IrDA NEC.
void(* IrDA_Code_Exe)(volatile uint8_t *IR_CODE)
void IrDa_NEC_Rx(uint32_t u32Time)
This function is used to detect NEC IR procotol.