FaxData2pc.lst
上传用户:xhjmsc
上传日期:2019-09-13
资源大小:389k
文件大小:30k
- ##############################################################################
- # #
- # IAR MSP430 C/EC++ Compiler V2.10A/W32 23/Apr/2007 18:04:08 #
- # Copyright 1996-2003 IAR Systems. All rights reserved. #
- # #
- # __rt_version = 1 #
- # __double_size = 32 #
- # __reg_r4 = free #
- # __reg_r5 = free #
- # __pic = no #
- # Source file = E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # filesFaxData2pc.c #
- # Command line = -I "C:Program FilesIAR SystemsEmbedded Workbench #
- # 3.2430INC" -I "C:Program FilesIAR #
- # SystemsEmbedded Workbench 3.2430INCCLIB" -lCN #
- # E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugList -lA E:projectFaxProgramVson_Bryan_Fax_ #
- # Conexant_070423DebugList -o #
- # E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugObj -z2 --no_cse --no_unroll --no_inline #
- # --no_code_motion --debug -e #
- # E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # filesFaxData2pc.c #
- # List file = E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugListFaxData2pc.lst #
- # Object file = E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugObjFaxData2pc.r43 #
- # #
- # #
- ##############################################################################
- E:projectFaxProgramVson_Bryan_Fax_Conexant_070423filesFaxData2pc.c
- 1 /************************************************
- 2 Description:
- 3 Send the received fax raw data to PC via MAX232
- 4 3G 2-dimensional Data Format Recommendation T.4
- 5 Input:
- 6 none
- 7 Output:
- 8 none
- 9 Update:
- 10 2006.11.02 Bryan function header create
- 11 ************************************************/
- 12
- 13 #include "includeH.h"
- In segment DATA16_AN, at 0x35
- unsigned char volatile __data P6OUT
- P6OUT:
- 000000 DS8 1
- 14
- In segment CODE, align 2, keep-with-next
- 15 void FaxData2PCFromSoftUart(void) // send the received fax data to PC via MAX232
- FaxData2PCFromSoftUart:
- 16 {
- 000000 0A12 PUSH.W R10
- 000002 0B12 PUSH.W R11
- 000004 0812 PUSH.W R8
- 000006 0912 PUSH.W R9
- 000008 0612 PUSH.W R6
- 00000A 0712 PUSH.W R7
- 00000C 0412 PUSH.W R4
- 00000E 0512 PUSH.W R5
- 000010 2183 SUB.W #0x2, SP
- 17 unsigned char ucFlashColumnAddCnt=0,
- 000012 4743 MOV.B #0x0, R7
- 18 ucRxIndex=0,ucBlockCnt=0;
- 000014 4A43 MOV.B #0x0, R10
- 000016 4B43 MOV.B #0x0, R11
- 19 unsigned char ucGeneralCnt=0;
- 000018 4443 MOV.B #0x0, R4
- 20 unsigned int wNewFaxHead=0, wNewFaxRear=0,
- 00001A 81430000 MOV.W #0x0, 0x0(SP)
- 00001E 0543 MOV.W #0x0, R5
- 21 wNextPageAddress=0,wPageAddress=0,
- 000020 0843 MOV.W #0x0, R8
- 000022 0943 MOV.W #0x0, R9
- 22 wGeneralCnt=0;
- 000024 0643 MOV.W #0x0, R6
- 23 //ucGeneralCnt=2;
- 24 //ZERO_ADDRESS();
- 25 //read rear pointer and read front pointer
- 26 //if RearAddress-FrontAddress!=0
- 27 // transfer and front++
- 28 //else
- 29 // transfer over
- 30 MODEM_BUS_CON_PORT |= SOFT_UART_2_PC;
- 000026 F2D010003500 BIS.B #0x10, &0x35
- 31 ReadLastFaxRearPointer();//get gwRearPointerAddress and gwPageAddress
- 00002C 7E401200 MOV.B #0x12, R14
- 000030 7C400F00 MOV.B #0xf, R12
- 000034 B012.... CALL #ReadLast16BytesFromFlashMemoryArea
- 32 //ReadLast16BytesFromFlashMemoryArea(cstFaxRearPointerTableStartBlockNum,cstFaxRearPointerTableOverBlockNum);
- 33 wNewFaxRear=gwPageAddress;
- 000038 1542.... MOV.W &gwPageAddress, R5
- 34 ReadLastFaxFrontPointer();//get gwFrontPointerAddress, gwPageAddress,
- 00003C 7E400E00 MOV.B #0xe, R14
- 000040 7C400B00 MOV.B #0xb, R12
- 000044 B012.... CALL #ReadLast16BytesFromFlashMemoryArea
- 35 //gwFrontPointerAddress and gwColumnAddress
- 36 gwPageAddress++; //add Dec.19, 2006
- 000048 9253.... ADD.W #0x1, &gwPageAddress
- 37 do{
- 38 wNextPageAddress=gwPageAddress+64;
- ??FaxData2PCFromSoftUart_0:
- 00004C 3E404000 MOV.W #0x40, R14
- 000050 1E52.... ADD.W &gwPageAddress, R14
- 000054 084E MOV.W R14, R8
- 39 wPageAddress=CalNextPageAddress(wPageAddress);
- 000056 0C49 MOV.W R9, R12
- 000058 B012.... CALL #CalNextPageAddress
- 00005C 094C MOV.W R12, R9
- 40 }while(wNextPageAddress==wPageAddress);
- 00005E 0899 CMP.W R9, R8
- 000060 F527 JEQ ??FaxData2PCFromSoftUart_0
- 41 wNewFaxHead=gwPageAddress;
- 000062 9142....0000 MOV.W &gwPageAddress, 0x0(SP)
- 42 if (wNewFaxHead<wNewFaxRear)//(wNewFaxHead!=wNewFaxRear)//modify Dec.20,2006
- 000068 81950000 CMP.W R5, 0x0(SP)
- 00006C DD2C JC ??FaxData2PCFromSoftUart_8
- 43 {
- 44
- 45 for (wPageAddress=wNewFaxHead;wPageAddress<=wNewFaxRear;)//wNewFaxHead
- 00006E 2941 MOV.W 0x0(SP), R9
- ??FaxData2PCFromSoftUart_6:
- 000070 0599 CMP.W R9, R5
- 000072 DA28 JNC ??FaxData2PCFromSoftUart_8
- 46 {
- 47
- 48 ROW_ADDRESS_LOW = wPageAddress & 0xff;
- 000074 C249.... MOV.B R9, &ROW_ADDRESS_LOW
- 49 ROW_ADDRESS_HIGH = (wPageAddress>>8) & 0xff;
- 000078 0E49 MOV.W R9, R14
- 00007A 8E10 SWPB R14
- 00007C 3EF0FF00 AND.W #0xff, R14
- 000080 C24E.... MOV.B R14, &ROW_ADDRESS_HIGH
- 50 for (ucFlashColumnAddCnt = 0;ucFlashColumnAddCnt < 8;ucFlashColumnAddCnt++)//8*256=2048
- 000084 4743 MOV.B #0x0, R7
- ??FaxData2PCFromSoftUart_2:
- 000086 7792 CMP.B #0x8, R7
- 000088 3A2C JC ??FaxData2PCFromSoftUart_9
- 51 {
- 52 //8 * 256 == 2048 Bytes 2^4*2^8 12bit column address HighColumnAddr:0~8
- 53 //total 8*256B+64B=2K+64B
- 54 COLUMN_ADDRESS_HIGH=ucFlashColumnAddCnt;
- 00008A C247.... MOV.B R7, &COLUMN_ADDRESS_HIGH
- 55 READ_256_BYTE();//read 256 Byte to aucUartRxBuf[256]
- 00008E B012.... CALL #READ_256_BYTE
- 56 for (wGeneralCnt=0;wGeneralCnt<256;wGeneralCnt++)//
- 000092 0643 MOV.W #0x0, R6
- ??FaxData2PCFromSoftUart_1:
- 000094 36900001 CMP.W #0x100, R6
- 000098 1C2C JC ??FaxData2PCFromSoftUart_10
- 57 {
- 58 SoftUartTxOneFrame(aucUartRxBuf[wGeneralCnt]);
- 00009A 5C46.... MOV.B aucUartRxBuf(R6), R12
- 00009E B012.... CALL #SoftUartTxOneFrame
- 59 if (aucUartRxBuf[wGeneralCnt-1] == 0xfb && aucUartRxBuf[wGeneralCnt-2] == 0x13 && aucUartRxBuf[wGeneralCnt-3] == 0xff)
- 0000A2 3E40.... MOV.W #aucUartRxBuf, R14
- 0000A6 0E56 ADD.W R6, R14
- 0000A8 FE90FB00FFFF CMP.B #0xfb, 0xffff(R14)
- 0000AE 0F20 JNE ??FaxData2PCFromSoftUart_11
- 0000B0 3E40.... MOV.W #aucUartRxBuf, R14
- 0000B4 0E56 ADD.W R6, R14
- 0000B6 FE901300FEFF CMP.B #0x13, 0xfffe(R14)
- 0000BC 0820 JNE ??FaxData2PCFromSoftUart_11
- 0000BE 3E40.... MOV.W #aucUartRxBuf, R14
- 0000C2 0E56 ADD.W R6, R14
- 0000C4 FE93FDFF CMP.B #0xff, 0xfffd(R14)
- 0000C8 0220 JNE ??FaxData2PCFromSoftUart_11
- 60 {_NOP();break;}
- 0000CA 0343 NOP
- 0000CC 023C JMP ??FaxData2PCFromSoftUart_10
- 61 }//third for
- ??FaxData2PCFromSoftUart_11:
- 0000CE 1653 ADD.W #0x1, R6
- 0000D0 E13F JMP ??FaxData2PCFromSoftUart_1
- 62 if (aucUartRxBuf[wGeneralCnt-1] == 0xfb && aucUartRxBuf[wGeneralCnt-2] == 0x13 && aucUartRxBuf[wGeneralCnt-3] == 0xff)
- ??FaxData2PCFromSoftUart_10:
- 0000D2 3E40.... MOV.W #aucUartRxBuf, R14
- 0000D6 0E56 ADD.W R6, R14
- 0000D8 FE90FB00FFFF CMP.B #0xfb, 0xffff(R14)
- 0000DE 0D20 JNE ??FaxData2PCFromSoftUart_12
- 0000E0 3E40.... MOV.W #aucUartRxBuf, R14
- 0000E4 0E56 ADD.W R6, R14
- 0000E6 FE901300FEFF CMP.B #0x13, 0xfffe(R14)
- 0000EC 0620 JNE ??FaxData2PCFromSoftUart_12
- 0000EE 3E40.... MOV.W #aucUartRxBuf, R14
- 0000F2 0E56 ADD.W R6, R14
- 0000F4 FE93FDFF CMP.B #0xff, 0xfffd(R14)
- 0000F8 0224 JEQ ??FaxData2PCFromSoftUart_9
- 63 break;
- 64 }//second for
- ??FaxData2PCFromSoftUart_12:
- 0000FA 5753 ADD.B #0x1, R7
- 0000FC C43F JMP ??FaxData2PCFromSoftUart_2
- 65
- 66 if (aucUartRxBuf[wGeneralCnt-1] == 0xfb && aucUartRxBuf[wGeneralCnt-2] == 0x13 && aucUartRxBuf[wGeneralCnt-3] == 0xff)//pageimage over
- ??FaxData2PCFromSoftUart_9:
- 0000FE 3E40.... MOV.W #aucUartRxBuf, R14
- 000102 0E56 ADD.W R6, R14
- 000104 FE90FB00FFFF CMP.B #0xfb, 0xffff(R14)
- 00010A 7E20 JNE ??FaxData2PCFromSoftUart_13
- 00010C 3E40.... MOV.W #aucUartRxBuf, R14
- 000110 0E56 ADD.W R6, R14
- 000112 FE901300FEFF CMP.B #0x13, 0xfffe(R14)
- 000118 7720 JNE ??FaxData2PCFromSoftUart_13
- 00011A 3E40.... MOV.W #aucUartRxBuf, R14
- 00011E 0E56 ADD.W R6, R14
- 000120 FE93FDFF CMP.B #0xff, 0xfffd(R14)
- 000124 7120 JNE ??FaxData2PCFromSoftUart_13
- 67 {
- 68 ATcmdDelay();// a bug of Dec.23,2006 FF 10 00 0E // receive data delay(if not, can't receive 0x10 0x03)
- 000126 B012.... CALL #ATcmdDelay
- 69 if ((gwGeneralPageAddress>>6) >=cstFaxFrontPointerTableOverBlockNum)
- 00012A 1C42.... MOV.W &gwGeneralPageAddress, R12
- 00012E B012.... CALL #?ShiftRight16u_6
- 000132 3C900E00 CMP.W #0xe, R12
- 000136 1C28 JNC ??FaxData2PCFromSoftUart_14
- 70 {
- 71 for (ucBlockCnt=0;ucBlockCnt<4;ucBlockCnt++)
- 000138 4B43 MOV.B #0x0, R11
- ??FaxData2PCFromSoftUart_3:
- 00013A 6B92 CMP.B #0x4, R11
- 00013C 142C JC ??FaxData2PCFromSoftUart_15
- 72 {
- 73 wPageAddress=(cstFaxFrontPointerTableStartBlockNum+ucBlockCnt)<<6;
- 00013E 4C4B MOV.B R11, R12
- 000140 3CF0FF00 AND.W #0xff, R12
- 000144 3C500B00 ADD.W #0xb, R12
- 000148 B012.... CALL #?ShiftLeft16_6
- 00014C 094C MOV.W R12, R9
- 74 ROW_ADDRESS_LOW=wPageAddress & 0XFF;
- 00014E C249.... MOV.B R9, &ROW_ADDRESS_LOW
- 75 ROW_ADDRESS_HIGH=(wPageAddress>>8) & 0XFF;
- 000152 0E49 MOV.W R9, R14
- 000154 8E10 SWPB R14
- 000156 3EF0FF00 AND.W #0xff, R14
- 00015A C24E.... MOV.B R14, &ROW_ADDRESS_HIGH
- 76 ERASE_ONE_BLOCK();
- 00015E B012.... CALL #ERASE_ONE_BLOCK
- 77 }
- 000162 5B53 ADD.B #0x1, R11
- 000164 EA3F JMP ??FaxData2PCFromSoftUart_3
- 78 gwGeneralPageAddress=cstFaxFrontPointerTableStartPage;
- ??FaxData2PCFromSoftUart_15:
- 000166 B240C002.... MOV.W #0x2c0, &gwGeneralPageAddress
- 79 gwColumnAddress=0;
- 00016C 8243.... MOV.W #0x0, &gwColumnAddress
- 80 }
- 81
- 82
- 83
- 84 ucRxIndex=0; //write Fax Rear Pointer
- ??FaxData2PCFromSoftUart_14:
- 000170 4A43 MOV.B #0x0, R10
- 85 aucUartRxBuf[ucRxIndex++]=wPageAddress & 0xff;
- 000172 4E4A MOV.B R10, R14
- 000174 3EF0FF00 AND.W #0xff, R14
- 000178 CE49.... MOV.B R9, aucUartRxBuf(R14)
- 00017C 5A53 ADD.B #0x1, R10
- 86 aucUartRxBuf[ucRxIndex++]=(wPageAddress>>8) & 0xff;
- 00017E 4F4A MOV.B R10, R15
- 000180 3FF0FF00 AND.W #0xff, R15
- 000184 0E49 MOV.W R9, R14
- 000186 8E10 SWPB R14
- 000188 3EF0FF00 AND.W #0xff, R14
- 00018C CF4E.... MOV.B R14, aucUartRxBuf(R15)
- 000190 5A53 ADD.B #0x1, R10
- 87 for(ucGeneralCnt=0;ucGeneralCnt<14;ucGeneralCnt++)
- 000192 4443 MOV.B #0x0, R4
- ??FaxData2PCFromSoftUart_4:
- 000194 74900E00 CMP.B #0xe, R4
- 000198 092C JC ??FaxData2PCFromSoftUart_16
- 88 {
- 89 aucUartRxBuf[ucRxIndex++] = 0x55;
- 00019A 4E4A MOV.B R10, R14
- 00019C 3EF0FF00 AND.W #0xff, R14
- 0001A0 FE405500.... MOV.B #0x55, aucUartRxBuf(R14)
- 0001A6 5A53 ADD.B #0x1, R10
- 90 }
- 0001A8 5453 ADD.B #0x1, R4
- 0001AA F43F JMP ??FaxData2PCFromSoftUart_4
- 91 Write16Bytes2FlashMemoryArea();
- ??FaxData2PCFromSoftUart_16:
- 0001AC B012.... CALL #Write16Bytes2FlashMemoryArea
- 92 if (gwColumnAddress<2096)
- 0001B0 B2903008.... CMP.W #0x830, &gwColumnAddress
- 0001B6 0C2C JC ??FaxData2PCFromSoftUart_17
- 93 {
- 94 if (gwColumnAddress<2048)
- 0001B8 B2900008.... CMP.W #0x800, &gwColumnAddress
- 0001BE 042C JC ??FaxData2PCFromSoftUart_18
- 95 gwColumnAddress+=512;
- 0001C0 B2500002.... ADD.W #0x200, &gwColumnAddress
- 0001C6 103C JMP ??FaxData2PCFromSoftUart_19
- 96 else
- 97 gwColumnAddress+=16;
- ??FaxData2PCFromSoftUart_18:
- 0001C8 B2501000.... ADD.W #0x10, &gwColumnAddress
- 0001CE 0C3C JMP ??FaxData2PCFromSoftUart_19
- 98 }
- 99 else
- 100 {
- 101 gwColumnAddress=0;
- ??FaxData2PCFromSoftUart_17:
- 0001D0 8243.... MOV.W #0x0, &gwColumnAddress
- 102 if (gwGeneralPageAddress<=959)gwGeneralPageAddress++;
- 0001D4 B290C003.... CMP.W #0x3c0, &gwGeneralPageAddress
- 0001DA 032C JC ??FaxData2PCFromSoftUart_20
- 0001DC 9253.... ADD.W #0x1, &gwGeneralPageAddress
- 0001E0 033C JMP ??FaxData2PCFromSoftUart_19
- 103 else
- 104 gwGeneralPageAddress=704;
- ??FaxData2PCFromSoftUart_20:
- 0001E2 B240C002.... MOV.W #0x2c0, &gwGeneralPageAddress
- 105 }
- 106 wPageAddress++;
- ??FaxData2PCFromSoftUart_19:
- 0001E8 1953 ADD.W #0x1, R9
- 107 if(wPageAddress==0)
- 0001EA 0993 CMP.W #0x0, R9
- 0001EC 0220 JNE ??FaxData2PCFromSoftUart_5
- 108 wPageAddress+=2560;//Mar. 1, 20007
- 0001EE 3950000A ADD.W #0xa00, R9
- 109 do{
- 110 wNextPageAddress=wPageAddress+64;
- ??FaxData2PCFromSoftUart_5:
- 0001F2 3E404000 MOV.W #0x40, R14
- 0001F6 0E59 ADD.W R9, R14
- 0001F8 084E MOV.W R14, R8
- 111 wPageAddress=CalNextPageAddress(wPageAddress);
- 0001FA 0C49 MOV.W R9, R12
- 0001FC B012.... CALL #CalNextPageAddress
- 000200 094C MOV.W R12, R9
- 112 }while(wNextPageAddress==wPageAddress);
- 000202 0899 CMP.W R9, R8
- 000204 F627 JEQ ??FaxData2PCFromSoftUart_5
- 000206 343F JMP ??FaxData2PCFromSoftUart_6
- 113 //ReadLastFaxFrontPointer();//read next write fax front pointer addr //delete at Jan. 19, 2007
- 114 continue;//break; a bug of Dec. 12,2006
- 115 }
- 116 wPageAddress++;
- ??FaxData2PCFromSoftUart_13:
- 000208 1953 ADD.W #0x1, R9
- 117 if(wPageAddress==0)
- 00020A 0993 CMP.W #0x0, R9
- 00020C 0220 JNE ??FaxData2PCFromSoftUart_7
- 118 wPageAddress+=2560;//Mar. 1, 20007
- 00020E 3950000A ADD.W #0xa00, R9
- 119 do{
- 120 wNextPageAddress=wPageAddress+64;//wNextPageAddress=gwPageAddress+64;
- ??FaxData2PCFromSoftUart_7:
- 000212 3E404000 MOV.W #0x40, R14
- 000216 0E59 ADD.W R9, R14
- 000218 084E MOV.W R14, R8
- 121 wPageAddress=CalNextPageAddress(wPageAddress);
- 00021A 0C49 MOV.W R9, R12
- 00021C B012.... CALL #CalNextPageAddress
- 000220 094C MOV.W R12, R9
- 122 }while(wNextPageAddress==wPageAddress);
- 000222 0899 CMP.W R9, R8
- 000224 F627 JEQ ??FaxData2PCFromSoftUart_7
- 000226 243F JMP ??FaxData2PCFromSoftUart_6
- 123 }//third for ----> next page
- 124
- 125 }//if wNewFaxHead<wNewFaxRear
- 126 MODEM_BUS_CON_PORT &= ~SOFT_UART_2_PC;
- ??FaxData2PCFromSoftUart_8:
- 000228 F2C010003500 BIC.B #0x10, &0x35
- 127 }//function over
- 00022E 2153 ADD.W #0x2, SP
- 000230 3040.... BR #?Epilogue8
- 128
- 129 /*
- 130 void FaxData2PCFromUart(void) // send the received fax data to PC via MAX232
- 131 {
- 132 unsigned char ucFlashColumnAddCnt=0,ucRxIndex=0,
- 133 ucGeneralCnt=0;
- 134 unsigned int wNewFaxHead=0, wNewFaxRear=0,
- 135 wNextPageAddress=0,wPageAddress=0;
- 136 //ucGeneralCnt=2;
- 137 //ZERO_ADDRESS();
- 138 //read rear pointer and read front pointer
- 139 //if RearAddress-FrontAddress!=0
- 140 // transfer and front++
- 141 //else
- 142 // transfer over
- 143 ReadLastFaxRearPointer();//get gwRearPointerAddress and gwPageAddress
- 144 wNewFaxRear=gwPageAddress;
- 145 ReadLastFaxFrontPointer();//get gwFrontPointerAddress, gwPageAddress,
- 146 //gwFrontPointerAddress and gwColumnAddress
- 147 gwPageAddress++; //add Dec.19, 2006
- 148 do{
- 149 wNextPageAddress=gwPageAddress+64;
- 150 wPageAddress=CalNextPageAddress(wPageAddress);
- 151 }while(wNextPageAddress==wPageAddress);
- 152 wNewFaxHead=gwPageAddress;
- 153 if (wNewFaxHead<wNewFaxRear)//(wNewFaxHead!=wNewFaxRear)//modify Dec.20,2006
- 154 {
- 155
- 156 for (wPageAddress=wNewFaxHead;wPageAddress<=wNewFaxRear;)//wNewFaxHead
- 157 {
- 158
- 159 ROW_ADDRESS_LOW = wPageAddress & 0xff;
- 160 ROW_ADDRESS_HIGH = (wPageAddress>>8) & 0xff;
- 161 for (ucFlashColumnAddCnt = 0;ucFlashColumnAddCnt < 8;ucFlashColumnAddCnt++)//8*256=2048
- 162 {
- 163 //8 * 256 == 2048 Bytes 2^4*2^8 12bit column address HighColumnAddr:0~8
- 164 //total 8*256B+64B=2K+64B
- 165 COLUMN_ADDRESS_HIGH=ucFlashColumnAddCnt;
- 166 READ_256_BYTE();//read 256 Byte to aucUartRxBuf[256]
- 167 for (ucGeneralCnt=0;ucGeneralCnt<4;ucGeneralCnt++)//16*16Bytes send 16Bytes one time
- 168 //modify Dec.28,2006 4*64Bytes one time
- 169 {
- 170 Send64BytePageImageData(64,ucGeneralCnt);
- 171 while(gucTxBufCnt!=0)//send over, gucTxBufCnt == 0
- 172 {
- 173 ;
- 174 }
- 175 //ATcmdDelay();
- 176 if (gwTxNum != 64 && TXBUF0==0xfb)
- 177 break;
- 178 }//third for
- 179 if (gwTxNum != 64)
- 180 break;
- 181 }//second for
- 182
- 183 if ((gwTxNum != 64)
- 184 || (aucUartTxBuf[gwTxNum-1] == 0xfb && aucUartTxBuf[gwTxNum-2] == 0x13 && aucUartTxBuf[gwTxNum-3] == 0xff)
- 185 //(aucUartTxBuf[gwTxNum] == 0xfb && aucUartTxBuf[gwTxNum-1] == 0x13 && aucUartTxBuf[gwTxNum-2] == 0xff)//a bug of Jan.24, 2007
- 186 )//gwTxNum!=16, pageimage over
- 187 { //(gwTxNum != 16) modify Dec.20,2006
- 188 ATcmdDelay();// a bug of Dec.23,2006 FF 10 00 0E // receive data delay(if not, can't receive 0x10 0x03)
- 189 ucRxIndex=0; //write Fax Rear Pointer
- 190 aucUartRxBuf[ucRxIndex++]=wPageAddress & 0xff;
- 191 aucUartRxBuf[ucRxIndex++]=(wPageAddress>>8) & 0xff;
- 192 aucUartRxBuf[ucRxIndex++]=0x55;
- 193 aucUartRxBuf[ucRxIndex++]=0x55;
- 194 WriteFaxFrontPointerTable();
- 195 wPageAddress++;
- 196 do{
- 197 wNextPageAddress=wPageAddress+64;
- 198 wPageAddress=CalNextPageAddress(wPageAddress);
- 199 }while(wNextPageAddress==wPageAddress);
- 200 //ReadLastFaxFrontPointer();//read next write fax front pointer addr //delete at Jan. 19, 2007
- 201 continue;//break; a bug of Dec. 12,2006
- 202 }
- 203 wPageAddress++;
- 204 do{
- 205 wNextPageAddress=wPageAddress+64;//wNextPageAddress=gwPageAddress+64;
- 206 wPageAddress=CalNextPageAddress(wPageAddress);
- 207 }while(wNextPageAddress==wPageAddress);
- 208 }//for ----> next page
- 209
- 210 //ATcmdDelay(); // receive data delay(if not, can't receive 0x10 0x03)
- 211
- 212
- 213 }//if RearPointer!=FrontPointer
- 214 //gucRxTxFlag = DTETX; // Del at Dec.25,2006
- 215 }
- 216 */
- 217 /*
- 218 void Send64BytePageImageData(unsigned char ucTxDataNum,unsigned char ucGeneralCnt)
- 219 {
- 220 unsigned char ucDataCnt = 0;
- 221
- 222 gwTxNum=ucTxDataNum;
- 223 gpucTxBufPnt = 0;
- 224 for(ucDataCnt=0;ucDataCnt<64;ucDataCnt++) //ready data to TxdataBuf[]
- 225 {
- 226 aucUartTxBuf[ucDataCnt]=aucUartRxBuf[64*ucGeneralCnt+ucDataCnt];
- 227 gdwRxQueueFrontCnt++;
- 228 //There is a bug. when a[255]==10 && a[0]==03 && a[1]==fb, it will be error. it should add Length Judge
- 229 if (aucUartTxBuf[ucDataCnt] == 0xfb && aucUartTxBuf[ucDataCnt-1] == 0x13 && aucUartTxBuf[ucDataCnt-2] == 0xff)
- 230 {
- 231 gwTxNum = ucDataCnt+1;
- 232 break;
- 233 }
- 234 }
- 235 TXBUF0=aucUartTxBuf[0]; //start sent
- 236 gucTxBufCnt=1; //aucUartTxBuf[0] is the first byte, next TX is the second.
- 237 }
- 238 */
- Maximum stack usage in bytes:
- Function CSTACK
- -------- ------
- FaxData2PCFromSoftUart 20
- -> ReadLast16BytesFromFlashMemoryArea
- 20
- -> ReadLast16BytesFromFlashMemoryArea
- 20
- -> CalNextPageAddress 20
- -> READ_256_BYTE 20
- -> SoftUartTxOneFrame 20
- -> ATcmdDelay 20
- -> ERASE_ONE_BLOCK 20
- -> Write16Bytes2FlashMemoryArea
- 20
- -> CalNextPageAddress 20
- -> CalNextPageAddress 20
- Segment part sizes:
- Function/Label Bytes
- -------------- -----
- P6OUT 1
- FaxData2PCFromSoftUart 564
-
- 564 bytes in segment CODE
- 1 byte in segment DATA16_AN
-
- 564 bytes of CODE memory
- 0 bytes of DATA memory (+ 1 byte shared)
- Errors: none
- Warnings: none