📄 ir.lst
字号:
C51 COMPILER V7.50 IR 07/03/2006 14:17:10 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE IR
OBJECT MODULE PLACED IN ..\..\OUTPUT\NTSC_SOUTH\Ir.obj
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE ..\..\KERNEL\Ir.c OPTIMIZE(9,SIZE) BROWSE ORDER INCDIR(..\..\INC\;..\..\UI\
-NTSC_SOUTH\) DEFINE(PABLO,MCU_MTV412M,OLGA) DEBUG OBJECTEXTEND PRINT(..\..\OUTPUT\NTSC_SOUTH\Ir.lst) OBJECT(..\..\OUTPUT
-\NTSC_SOUTH\Ir.obj)
line level source
1 /******************************************************************************
2 Copyright (c) 2004 MStar Semiconductor, Inc.
3 All rights reserved.
4
5 [Module Name]: Ir.c
6 [Date]: 04-Feb-2004
7 [Comment]:
8 Remote control subroutines.
9 [Reversion History]:
10 *******************************************************************************/
11
12 #define _IR_C_
13
14 // System
15 #include <intrins.h>
16
17 // Common
18 #include "define.h"
19 #include "mcu.h"
20 #include "userdef.h"
21 // External
22 #include "i2c.h"
23 #include "uart.h"
24 #include "common.h"
25 #include "userpref.h"
26 #include "board.h"
27
28 #include "global.h"
29 #include "irfunc.h"
30
31 // Internal
32 #include "ir.h"
33
34
35 #if (IR_TYPE==IR_RC5)
#include "IR_RC5.c"
#elif (IR_TYPE==IR_NEC)
#include "IR_NEC.c"
#elif (IR_TYPE==IR_TOSHIBA)
40 #include "IR_TOSHIBA.c"
41 #endif
42
43 ////////////////////////////////////////////////////////////////////////////////////////
44 ////////////////////////////////////////////////////////////////////////////////////////
45 void irDecodeRepeat(BYTE ucRepeatTime)
46 {
47 1 if (g_bIrRepeat)
48 1 g_ucIrRepeatCounter = ucRepeatTime;
49 1 }
50
51 void irPolling(void)
52 {
53 1 if (g_ucIrRepeatCounter)
C51 COMPILER V7.50 IR 07/03/2006 14:17:10 PAGE 2
54 1 g_ucIrRepeatCounter--;
55 1 if (g_ucIrReleaseCounter)
56 1 {
57 2 if (--g_ucIrReleaseCounter == 0)
58 2 g_bIrRepeat = FALSE;
59 2 }
60 1 }
61
62 //////////////////////////////////////////////////////////////////////////////////////////////////
63 //////////////////////////////////////////////////////////////////////////////////////////////////
64 void irDetectTimer0(void)
65 {
66 1 if (++g_ucIrClocker > IR_OVERFLOW)
67 1 g_ucIrClocker = 0;//IR_OVERFLOW;
68 1 }
69
70
71 #if (IR_CODE_DEBUG_EN)
72 void irDebugHandler(void)
73 {
74 1 // if (g_ucIR_ErrTimeCount)
75 1 // return;
76 1 #if 1
77 1 if (IR_DebugCustomerCode0_OKFlag)
78 1 {
79 2 Clr_IR_DebugCustomerCode0_OKFlag();
80 2 printf("\r\n[IR0]: %x",g_ucIRDebugCode0);
81 2 g_ucIRDebugCode0=0;
82 2 }
83 1 if (IR_DebugCustomerCode1_OKFlag)
84 1 {
85 2 Clr_IR_DebugCustomerCode1_OKFlag();
86 2 printf("\r\n[IR1]: %x",g_ucIRDebugCode1);
87 2 //printf("\r\n[IR1]: %d",g_ucIRDebugCode1);
88 2 g_ucIRDebugCode0=0;
89 2 }
90 1 #endif
91 1 if (IR_DebugData_OKFlag)
92 1 {
93 2 Clr_IR_DebugData_OKFlag();
94 2 printf("\r\n [Code]: %x",g_ucIRDebugData);
95 2 }
96 1 }
97 #endif
98
99
100 #ifdef DVDENABLE
void irConvertIRTODVD(unsigned char Data)
{
unsigned char i = 0;
for (i = 0; i < 8; i++)
{
if (Data & 0x01)
{
Delay1ms(1);
Delay10us(31);
pinDVDIRSend = 0;
Delay10us(40);
pinDVDIRSend = 1;
}
else//0
{
C51 COMPILER V7.50 IR 07/03/2006 14:17:10 PAGE 3
Delay10us(22);
pinDVDIRSend = 0;
Delay10us(40);
pinDVDIRSend = 1;
}
Data = Data >> 1;
}
}
void irSendIRTODVD(void)
{
unsigned char i = 0;
unsigned char uc = 0x00;
EA = 0;
SetIRBYPassOFF();
pinDVDIRSend = 1;
Delay1ms(5);
//IRstart
pinDVDIRSend = 0;
Delay1ms(9);
pinDVDIRSend = 1;
Delay1ms(4);
Delay10us(25);
pinDVDIRSend = 0;//13.5ms
Delay10us(28);
pinDVDIRSend = 1;
//Delay1ms(1);
irConvertIRTODVD(0x00);
irConvertIRTODVD(0x00);
irConvertIRTODVD(g_IrCodeParam[4]);
irConvertIRTODVD(~g_IrCodeParam[4]);
Delay1ms(20);
pinDVDIRSend = 1;
Delay1ms(5);
//IRstart
pinDVDIRSend = 0;
Delay1ms(9);
pinDVDIRSend = 1;
Delay1ms(4);
Delay10us(25);
pinDVDIRSend = 0;//13.5ms
Delay10us(28);
pinDVDIRSend = 1;
//Delay1ms(1);
irConvertIRTODVD(0x00);
irConvertIRTODVD(0x99);
irConvertIRTODVD(g_IrCodeParam[4]);
irConvertIRTODVD(~g_IrCodeParam[4]);
EA = 1;
}
#endif
172
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 391 ----
CONSTANT SIZE = 96 ----
C51 COMPILER V7.50 IR 07/03/2006 14:17:10 PAGE 4
XDATA SIZE = 4 ----
PDATA SIZE = ---- ----
DATA SIZE = 9 ----
IDATA SIZE = ---- ----
BIT SIZE = 7 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -