⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xllp_ost.cod

📁 pxa270为硬件平台的wince操作系统XLLP驱动源码
💻 COD
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4345 

	TTL	F:\wm520\PLATFORM\intel_dbpxa27x\Public\CSP\ARM\INTEL\PXA27X\XLLP\SOURCE\.\xllp_ost.c
	CODE32

  00000			 AREA	 |.drectve|, DRECTVE
	DCB	"-defaultlib:coredll.lib "
	DCB	"-defaultlib:corelibc.lib "

	EXPORT	|XllpOstConfigureTimer|
; File f:\wm520\platform\intel_dbpxa27x\public\csp\arm\intel\pxa27x\xllp\source\xllp_ost.c

  00000			 AREA	 |.text| { |XllpOstConfigureTimer| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$XllpOstConfigureTimer|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpOstConfigureTimer| } ; comdat associative
|$T639|	DCD	|$L638|
	DCD	0x40003a01
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |XllpOstConfigureTimer| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |XllpOstConfigureTimer| PROC

; 53   : {

  00000		 |$L638|
  00000	e92d40f0	 stmdb       sp!, {r4 - r7, lr}
  00004		 |$M636|
  00004	e1a07002	 mov         r7, r2

; 54   : 
; 55   :     P_XLLP_OST_T        pOSTRegs = pOSTHandle->pOSTRegs;

  00008	e590e000	 ldr         lr, [r0]

; 56   :     P_XLLP_INTC_T       pINTCRegs = pOSTHandle->pINTCRegs;

  0000c	e5906004	 ldr         r6, [r0, #4]

; 57   :     P_XLLP_VUINT32_T    pOSTMatchReg;
; 58   :     XLLP_UINT32_T       ossrbit,
; 59   :                         oierbit,
; 60   :                         icmrbit;
; 61   : 
; 62   :     switch (matchreg)

  00010	e3510001	 cmp         r1, #1
  00014	0a00001f	 beq         |$L572|
  00018	e3510002	 cmp         r1, #2
  0001c	0a000018	 beq         |$L573|
  00020	e3510003	 cmp         r1, #3
  00024	0a000011	 beq         |$L574|
  00028	e3510004	 cmp         r1, #4
  0002c	0a00000a	 beq         |$L575|
  00030	e3510005	 cmp         r1, #5

; 63   :     {
; 64   :         default:
; 65   :         case MatchReg0:
; 66   :             ossrbit = XLLP_OSSR_M0;

  00034	13a00001	 movne       r0, #1

; 67   :             oierbit = XLLP_OIER_E0;

  00038	13a01001	 movne       r1, #1

; 68   :             icmrbit = XLLP_INTC_OSMR0;

  0003c	13a04301	 movne       r4, #1, 6

; 69   :             pOSTMatchReg = &(pOSTRegs->osmr0);

  00040	11a0500e	 movne       r5, lr
  00044	1a000017	 bne         |$L568|

; 99   : 
; 100  : 		case MatchReg5:
; 101  :             ossrbit = XLLP_OSSR_M5;

  00048	e3a00020	 mov         r0, #0x20

; 102  :             oierbit = XLLP_OIER_E5;

  0004c	e3a01020	 mov         r1, #0x20

; 103  :             icmrbit = XLLP_INTC_OSMRXX_4;

  00050	e3a04080	 mov         r4, #0x80

; 104  :             pOSTMatchReg = &(pOSTRegs->osmr5);

  00054	e28e5084	 add         r5, lr, #0x84

; 105  :             break;

  00058	ea000012	 b           |$L568|
  0005c		 |$L575|

; 92   : 
; 93   : 		case MatchReg4:
; 94   :             ossrbit = XLLP_OSSR_M4;

  0005c	e3a00010	 mov         r0, #0x10

; 95   :             oierbit = XLLP_OIER_E4;

  00060	e3a01010	 mov         r1, #0x10

; 96   :             icmrbit = XLLP_INTC_OSMRXX_4;

  00064	e3a04080	 mov         r4, #0x80

; 97   :             pOSTMatchReg = &(pOSTRegs->osmr4);

  00068	e28e5080	 add         r5, lr, #0x80

; 98   :             break;

  0006c	ea00000d	 b           |$L568|
  00070		 |$L574|

; 85   : 
; 86   :         case MatchReg3:
; 87   :             ossrbit = XLLP_OSSR_M3;

  00070	e3a00008	 mov         r0, #8

; 88   :             oierbit = XLLP_OIER_E3;

  00074	e3a01008	 mov         r1, #8

; 89   :             icmrbit = XLLP_INTC_OSMR3;

  00078	e3a04202	 mov         r4, #2, 4

; 90   :             pOSTMatchReg = &(pOSTRegs->osmr3);

  0007c	e28e500c	 add         r5, lr, #0xC

; 91   :             break;

  00080	ea000008	 b           |$L568|
  00084		 |$L573|

; 77   :             break;
; 78   : 
; 79   :         case MatchReg2:
; 80   :             ossrbit = XLLP_OSSR_M2;

  00084	e3a00004	 mov         r0, #4

; 81   :             oierbit = XLLP_OIER_E2;

  00088	e3a01004	 mov         r1, #4

; 82   :             icmrbit = XLLP_INTC_OSMR2;

  0008c	e3a04201	 mov         r4, #1, 4

; 83   :             pOSTMatchReg = &(pOSTRegs->osmr2);

  00090	e28e5008	 add         r5, lr, #8

; 84   :             break;

  00094	ea000003	 b           |$L568|
  00098		 |$L572|

; 70   :             break;
; 71   : 
; 72   :         case MatchReg1:
; 73   :             ossrbit = XLLP_OSSR_M1;

  00098	e3a00002	 mov         r0, #2

; 74   :             oierbit = XLLP_OIER_E1;

  0009c	e3a01002	 mov         r1, #2

; 75   :             icmrbit = XLLP_INTC_OSMR1;

  000a0	e3a04302	 mov         r4, #2, 6

; 76   :             pOSTMatchReg = &(pOSTRegs->osmr1);

  000a4	e28e5004	 add         r5, lr, #4
  000a8		 |$L568|

; 106  :     }
; 107  : 
; 108  :     //
; 109  :     // Disable interrupts on the specified Match register
; 110  :     //
; 111  :     pOSTRegs->oier &= ~(oierbit | XLLP_OIER_RESERVED_BITS);

  000a8	e3a03000	 mov         r3, #0
  000ac	e59e201c	 ldr         r2, [lr, #0x1C]
  000b0	e2433a01	 sub         r3, r3, #1, 20
  000b4	e1813003	 orr         r3, r1, r3
  000b8	e1c23003	 bic         r3, r2, r3
  000bc	e58e301c	 str         r3, [lr, #0x1C]

; 112  : 
; 113  :     //
; 114  :     // Clear any interrupt on the specified Match register
; 115  :     //
; 116  :     pOSTRegs->ossr = ossrbit; 

  000c0	e58e0014	 str         r0, [lr, #0x14]

; 117  : 
; 118  :     // 
; 119  : 	// Set up the match register to expire when the oscr0 reaches
; 120  :     // the next match interval.
; 121  : 	//
; 122  :     *pOSTMatchReg = matchvalue; 

  000c4	e5857000	 str         r7, [r5]

; 123  : 
; 124  :     //
; 125  :     // Enable the Match register interrupt on 
; 126  :     //
; 127  :     pOSTRegs->oier|= oierbit;

  000c8	e59e301c	 ldr         r3, [lr, #0x1C]

; 128  : 
; 129  :     //
; 130  :     // Enable the Match interrupt at the interrupt controller
; 131  :     //
; 132  :     pINTCRegs->icmr |= icmrbit; 

  000cc	e1833001	 orr         r3, r3, r1
  000d0	e58e301c	 str         r3, [lr, #0x1C]
  000d4	e5963004	 ldr         r3, [r6, #4]
  000d8	e1833004	 orr         r3, r3, r4
  000dc	e5863004	 str         r3, [r6, #4]

; 133  : 
; 134  :     return;
; 135  : 
; 136  : }

  000e0	e8bd40f0	 ldmia       sp!, {r4 - r7, lr}
  000e4	e12fff1e	 bx          lr
  000e8		 |$M637|

			 ENDP  ; |XllpOstConfigureTimer|

	EXPORT	|XllpOstConfigureMatchReg|

  00000			 AREA	 |.text| { |XllpOstConfigureMatchReg| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$XllpOstConfigureMatchReg|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpOstConfigureMatchReg| } ; comdat associative
|$T651|	DCD	|$L650|
	DCD	0x40000701
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |XllpOstConfigureMatchReg| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |XllpOstConfigureMatchReg| PROC

; 165  : {

  00000		 |$L650|
  00000	e52de004	 str         lr, [sp, #-4]!
  00004		 |$M648|

; 166  :     P_XLLP_OST_T        pOSTRegs = pOSTHandle->pOSTRegs;

  00004	e5903000	 ldr         r3, [r0]

; 167  :     XLLP_UINT32_T       matchvalue;
; 168  : 
; 169  :     //
; 170  :     // Compute the new match value to load
; 171  :     //
; 172  :     matchvalue = pOSTRegs->oscr0 + matchincrement;
; 173  : 
; 174  :     //
; 175  :     // Configure the timer to interrupt at that match value
; 176  :     //
; 177  :     XllpOstConfigureTimer (pOSTHandle, matchreg, matchvalue);

  00008	e5933010	 ldr         r3, [r3, #0x10]
  0000c	e0832002	 add         r2, r3, r2
  00010	eb000000	 bl          XllpOstConfigureTimer

; 178  : 
; 179  : }

  00014	e49de004	 ldr         lr, [sp], #4
  00018	e12fff1e	 bx          lr
  0001c		 |$M649|

			 ENDP  ; |XllpOstConfigureMatchReg|


  00000			 AREA	 |.text| { |XllpOstDelayTicks| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$XllpOstDelayTicks|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpOstDelayTicks| } ; comdat associative
|$T662|	DCD	|$L661|
	DCD	0x40000600
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |XllpOstDelayTicks| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |XllpOstDelayTicks| PROC

; 242  : {    

  00000		 |$L661|
  00000		 |$M659|

; 243  :     XLLP_UINT32_T    start_time;
; 244  : 
; 245  :     start_time = pOstRegs->oscr0;

  00000	e5902010	 ldr         r2, [r0, #0x10]
  00004		 |$L605|

; 246  : 
; 247  :     //
; 248  :     // Unsigned math handles any wraparound.
; 249  :     // Can抰 simplify the test because of possible wraparound.
; 250  :     // Good for up to 2^32-1 ticks in a bare-metal 
; 251  :     //     environment where the thread of execution 
; 252  :     //     is never suspended.
; 253  :     //
; 254  :  
; 255  :     while ((pOstRegs->oscr0 - start_time) < ticks);

  00004	e5903010	 ldr         r3, [r0, #0x10]
  00008	e0433002	 sub         r3, r3, r2
  0000c	e1530001	 cmp         r3, r1
  00010	3afffffb	 bcc         |$L605|

; 256  : 
; 257  :     return;
; 258  : 
; 259  : } // XllpOstDelayTicks()

  00014	e12fff1e	 bx          lr
  00018		 |$M660|

			 ENDP  ; |XllpOstDelayTicks|

	EXPORT	|XllpOstDelayMicroSeconds|

  00000			 AREA	 |.text| { |XllpOstDelayMicroSeconds| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$XllpOstDelayMicroSeconds|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpOstDelayMicroSeconds| } ; comdat associative
|$T680|	DCD	|$L679|
	DCD	0x40000700
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |XllpOstDelayMicroSeconds| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |XllpOstDelayMicroSeconds| PROC

; 195  : {

  00000		 |$L679|
  00000		 |$M677|

; 196  :     XLLP_UINT32_T    ticks;
; 197  : 
; 198  :     ticks = microseconds * XLLP_OST_TICKS_US;  // approx. 3 ticks per microsecond. 
; 199  :     XllpOstDelayTicks (pOstRegs, ticks);

  00000	e5902010	 ldr         r2, [r0, #0x10]
  00004	e0811081	 add         r1, r1, r1, lsl #1
  00008		 |$L669|
  00008	e5903010	 ldr         r3, [r0, #0x10]
  0000c	e0433002	 sub         r3, r3, r2
  00010	e1530001	 cmp         r3, r1
  00014	3afffffb	 bcc         |$L669|

; 200  : 
; 201  : }

  00018	e12fff1e	 bx          lr
  0001c		 |$M678|

			 ENDP  ; |XllpOstDelayMicroSeconds|

	EXPORT	|XllpOstDelayMilliSeconds|

  00000			 AREA	 |.text| { |XllpOstDelayMilliSeconds| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$XllpOstDelayMilliSeconds|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpOstDelayMilliSeconds| } ; comdat associative
|$T698|	DCD	|$L697|
	DCD	0x40000b01
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |XllpOstDelayMilliSeconds| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |XllpOstDelayMilliSeconds| PROC

; 217  : {

  00000		 |$L697|
  00000	e52de004	 str         lr, [sp, #-4]!
  00004		 |$M695|

; 218  :     XLLP_UINT32_T    ticks;
; 219  : 
; 220  :     ticks = milliseconds * XLLP_OST_TICKS_MS;

  00004	e3a03ecb	 mov         r3, #0xCB, 28
  00008	e3833002	 orr         r3, r3, #2

; 221  :     XllpOstDelayTicks (pOstRegs, ticks);

  0000c	e5902010	 ldr         r2, [r0, #0x10]
  00010	e00e0391	 mul         lr, r1, r3
  00014		 |$L687|
  00014	e5903010	 ldr         r3, [r0, #0x10]
  00018	e0433002	 sub         r3, r3, r2
  0001c	e153000e	 cmp         r3, lr
  00020	3afffffb	 bcc         |$L687|

; 222  :     return;
; 223  : }

  00024	e49de004	 ldr         lr, [sp], #4
  00028	e12fff1e	 bx          lr
  0002c		 |$M696|

			 ENDP  ; |XllpOstDelayMilliSeconds|

	END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -