📄 xllp_wm8753.cod
字号:
; 168 :
; 169 : }
; 170 :
; 171 : timer = 0;
; 172 :
; 173 : // EdbgOutputDebugString ( "step3 : pI2CReg->ISR %x \r\n",(pDeviceContext->pCtrlReg)->ISR);
; 174 : (pDeviceContext->pCtrlReg)->ISR |= XLLP_ISR_ITE;
00114 e594200c ldr r2, [r4, #0xC]
00118 e3a01000 mov r1, #0
0011c e5923018 ldr r3, [r2, #0x18]
00120 e3833040 orr r3, r3, #0x40
00124 e5823018 str r3, [r2, #0x18]
; 175 :
; 176 : //STEP4: Read first byte operation
; 177 : (pDeviceContext->pCtrlReg)->ICR =( XLLP_ICR_TB | XLLP_ICR_UIE |XLLP_ICR_SCLEA );
00128 e594300c ldr r3, [r4, #0xC]
0012c e5830010 str r0, [r3, #0x10]
; 178 : while(!((pDeviceContext->pCtrlReg)->ISR & XLLP_ISR_IRF))
00130 e594000c ldr r0, [r4, #0xC]
00134 e5903018 ldr r3, [r0, #0x18]
00138 e3130080 tst r3, #0x80
0013c 1a000009 bne |$L1178|
; 179 : {
; 180 : timer++;
00140 e3a02000 mov r2, #0
00144 |$L1177|
00144 e2823001 add r3, r2, #1
00148 e1a01803 mov r1, r3, lsl #16
0014c e1a01821 mov r1, r1, lsr #16
; 181 :
; 182 : if(timer == 65536)
00150 e1a02001 mov r2, r1
00154 e3510801 cmp r1, #1, 16
00158 0a000025 beq |$L1330|
0015c e5903018 ldr r3, [r0, #0x18]
00160 e3130080 tst r3, #0x80
00164 0afffff6 beq |$L1177|
00168 |$L1178|
; 183 : {
; 184 : //EdbgOutputDebugString ( "XllpACodecWrite,STEP1 %x \r\n",pCtrlReg->ISR);
; 185 : return (XLLP_ACODEC_CONTROLLER_INTERFACE_TIMEOUT);
; 186 : }
; 187 :
; 188 : }
; 189 : //EdbgOutputDebugString ( "step4 : pI2CReg->ISR %x \r\n",(pDeviceContext->pCtrlReg)->ISR);
; 190 : (pDeviceContext->pCtrlReg)->ISR |= XLLP_ISR_IRF; //clear the bit
00168 e594200c ldr r2, [r4, #0xC]
; 191 :
; 192 : // temp = (pDeviceContext->pCtrlReg)->IDBR;
; 193 : //EdbgOutputDebugString ("step4 :temp =%x \r\n",temp);
; 194 : *regVal = (XLLP_UINT16_T) (pDeviceContext->pCtrlReg)->IDBR;
; 195 : // (pDeviceContext->pCtrlReg)->ICR &= ~(XLLP_ICR_STOP |XLLP_ISR_ACKNACK); //Clear STOP and ACKNAK bits
; 196 : (pDeviceContext->pCtrlReg)->ICR = 0;
; 197 :
; 198 : //STEP5: Read second BYTE operation
; 199 : (pDeviceContext->pCtrlReg)->ICR =(XLLP_ICR_STOP | XLLP_ICR_TB | XLLP_ICR_ACKNACK |XLLP_ICR_UIE |XLLP_ICR_SCLEA );
0016c e3a0006e mov r0, #0x6E
00170 e5923018 ldr r3, [r2, #0x18]
00174 e3833080 orr r3, r3, #0x80
00178 e5823018 str r3, [r2, #0x18]
0017c e594300c ldr r3, [r4, #0xC]
00180 e5933008 ldr r3, [r3, #8]
00184 e1c530b0 strh r3, [r5]
00188 e594300c ldr r3, [r4, #0xC]
0018c e583e010 str lr, [r3, #0x10]
00190 e594300c ldr r3, [r4, #0xC]
00194 e5830010 str r0, [r3, #0x10]
; 200 : while(!((pDeviceContext->pCtrlReg)->ISR & XLLP_ISR_IRF))
00198 e594200c ldr r2, [r4, #0xC]
0019c ea000004 b |$L1340|
001a0 |$L1182|
; 201 : {
; 202 : timer++;
001a0 e2813001 add r3, r1, #1
001a4 e1a01803 mov r1, r3, lsl #16
001a8 e1a01821 mov r1, r1, lsr #16
; 203 :
; 204 : if(timer == 65536)
001ac e3510801 cmp r1, #1, 16
001b0 0a00000f beq |$L1330|
001b4 |$L1340|
001b4 e5923018 ldr r3, [r2, #0x18]
001b8 e3130080 tst r3, #0x80
001bc 0afffff7 beq |$L1182|
; 208 : }
; 209 :
; 210 : }
; 211 : //EdbgOutputDebugString ( "step4 : pI2CReg->ISR %x \r\n",(pDeviceContext->pCtrlReg)->ISR);
; 212 : (pDeviceContext->pCtrlReg)->ISR |= XLLP_ISR_IRF; //clear the bit
001c0 e594200c ldr r2, [r4, #0xC]
; 213 :
; 214 : temp = (pDeviceContext->pCtrlReg)->IDBR;
; 215 : //EdbgOutputDebugString ("step4 :temp =%x \r\n",temp);
; 216 : *regVal |= (XLLP_UINT8_T) ( (pDeviceContext->pCtrlReg)->IDBR<<8);
; 217 :
; 218 : (pDeviceContext->pCtrlReg)->ICR = 0;
; 219 :
; 220 : return XLLP_ACODEC_SUCCESS;
001c4 e3a00000 mov r0, #0
001c8 e5923018 ldr r3, [r2, #0x18]
001cc e3833080 orr r3, r3, #0x80
001d0 e5823018 str r3, [r2, #0x18]
001d4 e594300c ldr r3, [r4, #0xC]
001d8 e1d520b0 ldrh r2, [r5]
001dc e5933008 ldr r3, [r3, #8]
001e0 e1c520b0 strh r2, [r5]
001e4 e594200c ldr r2, [r4, #0xC]
001e8 e582e010 str lr, [r2, #0x10]
; 221 : }
001ec e8bd40f0 ldmia sp!, {r4 - r7, lr}
001f0 e12fff1e bx lr
001f4 |$L1330|
; 205 : {
; 206 : //EdbgOutputDebugString ( "XllpACodecWrite,STEP1 %x \r\n",pCtrlReg->ISR);
; 207 : return (XLLP_ACODEC_CONTROLLER_INTERFACE_TIMEOUT);
001f4 e3a00003 mov r0, #3
; 221 : }
001f8 e8bd40f0 ldmia sp!, {r4 - r7, lr}
001fc e12fff1e bx lr
00200 |$M1342|
ENDP ; |XllpWm8753CodecRead|
EXPORT |XllpWm8753CodecSpecificInit|
00000 AREA |.text| { |XllpWm8753CodecSpecificInit| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753CodecSpecificInit|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753CodecSpecificInit| } ; comdat associative
|$T1354| DCD |$L1353|
DCD 0x40004f01
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753CodecSpecificInit| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753CodecSpecificInit| PROC
; 225 : {
00000 |$L1353|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M1351|
00004 e1a04000 mov r4, r0
; 226 :
; 227 : XllpWm8753CodecWrite(pDeviceContext, Wm8753_INPUTCTRL1, 0x10);
00008 e3a02010 mov r2, #0x10
0000c e3a0102f mov r1, #0x2F
00010 eb000000 bl XllpWm8753CodecWrite
; 228 : XllpWm8753CodecWrite(pDeviceContext, Wm8753_ADCINPUTMODE, 0x3d);
00014 e3a0203d mov r2, #0x3D
00018 e3a0102e mov r1, #0x2E
0001c e1a00004 mov r0, r4
00020 eb000000 bl XllpWm8753CodecWrite
; 229 :
; 230 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_ADCCONTROL, 0x18);//0x1c); //ADC high pass filter cutoff 170HZ, enable high pass filter
00024 e3a02018 mov r2, #0x18
00028 e3a01002 mov r1, #2
0002c e1a00004 mov r0, r4
00030 eb000000 bl XllpWm8753CodecWrite
; 231 : XllpWm8753CodecWrite(pDeviceContext, Wm8753_PM1,0x1D0); //0xD0); //VREF,Voice codec enabled , MICB disabled
00034 e3a02e1d mov r2, #0x1D, 28
00038 e3a01014 mov r1, #0x14
0003c e1a00004 mov r0, r4
00040 eb000000 bl XllpWm8753CodecWrite
; 232 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_PM2, 0x1ff);// 0x9); //linemix and Left ADC enabled
00044 e3a02f7f mov r2, #0x7F, 30
00048 e3822003 orr r2, r2, #3
0004c e3a01015 mov r1, #0x15
00050 e1a00004 mov r0, r4
00054 eb000000 bl XllpWm8753CodecWrite
; 233 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_PM3, 0x04); // 0x1ff); //all output enabled MONO1, LOUT1 enabled
00058 e3a02004 mov r2, #4
0005c e3a01016 mov r1, #0x16
00060 e1a00004 mov r0, r4
00064 eb000000 bl XllpWm8753CodecWrite
; 234 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_PM4, 0x0f);//0x5); //Left and MONOmix enabled
00068 e3a0200f mov r2, #0xF
0006c e3a01017 mov r1, #0x17
00070 e1a00004 mov r0, r4
00074 eb000000 bl XllpWm8753CodecWrite
; 235 :
; 236 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_MOUTMIX1, 0xD0);
00078 e3a020d0 mov r2, #0xD0
0007c e3a01026 mov r1, #0x26
00080 e1a00004 mov r0, r4
00084 eb000000 bl XllpWm8753CodecWrite
; 237 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_MOUTMIX2, 0x0D); //enable voice DAC to Monomixer, 0dB
00088 e3a0200d mov r2, #0xD
0008c e3a01027 mov r1, #0x27
00090 e1a00004 mov r0, r4
00094 eb000000 bl XllpWm8753CodecWrite
; 238 :
; 239 : XllpWm8753CodecWrite(pDeviceContext, Wm8753_CLOCKCTRL, 0x189); //internal master clock for voice codec is PCMCLK, orginal is 0x4
00098 e3a02f62 mov r2, #0x62, 30
0009c e3822001 orr r2, r2, #1
000a0 e3a01034 mov r1, #0x34
000a4 e1a00004 mov r0, r4
000a8 eb000000 bl XllpWm8753CodecWrite
; 240 :
; 241 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_PLL2CTRL1, 0x27); //PLL2 active and enabled, just for test purpose, should be 0x7
000ac e3a02027 mov r2, #0x27
000b0 e3a01039 mov r1, #0x39
000b4 e1a00004 mov r0, r4
000b8 eb000000 bl XllpWm8753CodecWrite
; 242 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_PLL2CTRL2, 0xe8); //N=7 k =23f548, F2=98.304MHZ
000bc e3a020e8 mov r2, #0xE8
000c0 e3a0103a mov r1, #0x3A
000c4 e1a00004 mov r0, r4
000c8 eb000000 bl XllpWm8753CodecWrite
; 243 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_PLL2CTRL3, 0x1fa);
000cc e3a02f7e mov r2, #0x7E, 30
000d0 e3822002 orr r2, r2, #2
000d4 e3a0103b mov r1, #0x3B
000d8 e1a00004 mov r0, r4
000dc eb000000 bl XllpWm8753CodecWrite
; 244 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_PLL2CTRL4, 0x148);
000e0 e3a02f52 mov r2, #0x52, 30
000e4 e3a0103c mov r1, #0x3C
000e8 e1a00004 mov r0, r4
000ec eb000000 bl XllpWm8753CodecWrite
; 245 :
; 246 : XllpWm8753CodecWrite(pDeviceContext, Wm8753_PCMAUDIOIF,0xf3); //0xb3); //16bit, DSP mode, modeB
000f0 e3a020f3 mov r2, #0xF3
000f4 e3a01003 mov r1, #3
000f8 e1a00004 mov r0, r4
000fc eb000000 bl XllpWm8753CodecWrite
; 247 : XllpWm8753CodecWrite(pDeviceContext, Wm8753_IFCONTROL,0x3); //0x0); //VXFS input.
00100 e3a02003 mov r2, #3
00104 e3a01005 mov r1, #5
00108 e1a00004 mov r0, r4
0010c eb000000 bl XllpWm8753CodecWrite
; 248 : XllpWm8753CodecWrite(pDeviceContext, Wm8753_SAMPLERATECTRL1, 0x100); //voice codec sample rate is 256fs
00110 e3a02c01 mov r2, #1, 24
00114 e3a01006 mov r1, #6
00118 e1a00004 mov r0, r4
0011c eb000000 bl XllpWm8753CodecWrite
; 249 : XllpWm8753CodecWrite(pDeviceContext,Wm8753_LOUTMIX2, 0x100); //voice DAC to left mixer
00120 e3a02c01 mov r2, #1, 24
00124 e3a01023 mov r1, #0x23
00128 e1a00004 mov r0, r4
0012c eb000000 bl XllpWm8753CodecWrite
; 250 :
; 251 :
; 252 : return (XLLP_ACODEC_SUCCESS);
00130 e3a00000 mov r0, #0
; 253 : }
00134 e8bd4010 ldmia sp!, {r4, lr}
00138 e12fff1e bx lr
0013c |$M1352|
ENDP ; |XllpWm8753CodecSpecificInit|
EXPORT |XllpWm8753EnableSspPath|
00000 AREA |.text| { |XllpWm8753EnableSspPath| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753EnableSspPath|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753EnableSspPath| } ; comdat associative
|$T1363| DCD |$L1362|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753EnableSspPath| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753EnableSspPath| PROC
; 257 : {
00000 |$L1362|
00000 |$M1360|
; 258 : //todo: specify control of PCM interface to save power (set the transmit path switchs (tx3, tx4, etc)
; 259 :
; 260 : return (XLLP_ACODEC_SUCCESS);
00000 e3a00000 mov r0, #0
; 261 :
; 262 : }
00004 e12fff1e bx lr
00008 |$M1361|
ENDP ; |XllpWm8753EnableSspPath|
EXPORT |XllpWm8753DisableSspPath|
00000 AREA |.text| { |XllpWm8753DisableSspPath| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753DisableSspPath|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753DisableSspPath| } ; comdat associative
|$T1372| DCD |$L1371|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753DisableSspPath| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753DisableSspPath| PROC
; 264 : {
00000 |$L1371|
00000 |$M1369|
; 265 : //todo: specify control of PCM interface to save power (set the transmit path switchs (tx3, tx4, etc)
; 266 :
; 267 : return (XLLP_ACODEC_SUCCESS);
00000 e3a00000 mov r0, #0
; 268 :
; 269 : }
00004 e12fff1e bx lr
00008 |$M1370|
ENDP ; |XllpWm8753DisableSspPath|
EXPORT |XllpWm8753SetMasterVol|
00000 AREA |.text| { |XllpWm8753SetMasterVol| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753SetMasterVol|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753SetMasterVol| } ; comdat associative
|$T1381| DCD |$L1380|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753SetMasterVol| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753SetMasterVol| PROC
; 274 : {
00000 |$L1380|
00000 |$M1378|
; 275 : //stub
; 276 : return (XLLP_ACODEC_SUCCESS);
00000 e3a00000 mov r0, #0
; 277 :
; 278 : }
00004 e12fff1e bx lr
00008 |$M1379|
ENDP ; |XllpWm8753SetMasterVol|
EXPORT |XllpWm8753GetInSampleRate|
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -