📄 msm9841.lst
字号:
215 2 _nop_();
216 2 _nop_();
217 2 _nop_();
218 2 _nop_();
219 2 _nop_();
220 2 _nop_();
221 2 _nop_();
222 2 _nop_();
223 2 _nop_();
224 2 _nop_();
225 2 _nop_();
226 2 _nop_();
227 2 _nop_();
228 2 _nop_();
229 2 }
230 1
231 1 for (configData=0; configData<0xff; configData++)
232 1 {
233 2 _nop_();
234 2 _nop_();
235 2 _nop_();
236 2 _nop_();
237 2 _nop_();
238 2 _nop_();
239 2 _nop_();
C51 COMPILER V7.09 MSM9841 09/17/2008 16:09:50 PAGE 5
240 2 _nop_();
241 2 _nop_();
242 2 _nop_();
243 2 _nop_();
244 2 _nop_();
245 2 _nop_();
246 2 _nop_();
247 2 _nop_();
248 2 _nop_();
249 2 _nop_();
250 2 _nop_();
251 2 _nop_();
252 2 _nop_();
253 2 }
254 1
255 1 D16CS &= 0x7f;
256 1 D12_Y1 = D16CS;//reset=0
257 1
258 1 for (configData=0; configData<0xff; configData++)
259 1 {
260 2 _nop_();
261 2 _nop_();
262 2 _nop_();
263 2 _nop_();
264 2 _nop_();
265 2 _nop_();
266 2 _nop_();
267 2 _nop_();
268 2 _nop_();
269 2 _nop_();
270 2 _nop_();
271 2 _nop_();
272 2 _nop_();
273 2 _nop_();
274 2 _nop_();
275 2 _nop_();
276 2 _nop_();
277 2 _nop_();
278 2 _nop_();
279 2 _nop_();
280 2 }
281 1
282 1 for (configData=0; configData<0xff; configData++)
283 1 {
284 2 _nop_();
285 2 _nop_();
286 2 _nop_();
287 2 _nop_();
288 2 _nop_();
289 2 _nop_();
290 2 _nop_();
291 2 _nop_();
292 2 _nop_();
293 2 _nop_();
294 2 _nop_();
295 2 _nop_();
296 2 _nop_();
297 2 _nop_();
298 2 _nop_();
299 2 _nop_();
300 2 _nop_();
301 2 _nop_();
C51 COMPILER V7.09 MSM9841 09/17/2008 16:09:50 PAGE 6
302 2 _nop_();
303 2 _nop_();
304 2 }
305 1 D16CS |= 0x80;
306 1 D12_Y1 = D16CS;//reset = 1
307 1
308 1 //delay
309 1 for (configData=0; configData<0xff; configData++)
310 1 {
311 2 _nop_();
312 2 _nop_();
313 2 _nop_();
314 2 _nop_();
315 2 _nop_();
316 2 _nop_();
317 2 _nop_();
318 2 _nop_();
319 2 _nop_();
320 2 _nop_();
321 2 _nop_();
322 2 _nop_();
323 2 _nop_();
324 2 _nop_();
325 2 _nop_();
326 2 _nop_();
327 2 _nop_();
328 2 _nop_();
329 2 _nop_();
330 2 _nop_();
331 2 }
332 1 //end delay
333 1
334 1 msm_modify_strobe_width();
335 1
336 1 //set synthesis method
337 1 configData = VOICE_SYN+BIT4_ADPCM;
338 1 msm_input_command(configData);
339 1 _nop_();
340 1 _nop_();
341 1 _nop_();
342 1 //analog specification 1;
343 1 //we use default config,use monaural playback
344 1 configData = ANALOG_SPEC1+0;
345 1 msm_input_command(configData);
346 1 _nop_();
347 1 _nop_();
348 1 _nop_();
349 1
350 1 //analog specification 2;
351 1 //we use default config
352 1 configData = ANALOG_SPEC2+0;
353 1 msm_input_command(configData);
354 1 _nop_();
355 1 _nop_();
356 1 _nop_();
357 1
358 1 //set fifo byte configuration
359 1 configData = FIFO_CONFIG+BIT1024;//BIT1024;
360 1 msm_input_command(configData);
361 1 _nop_();
362 1 _nop_();
363 1 _nop_();
C51 COMPILER V7.09 MSM9841 09/17/2008 16:09:50 PAGE 7
364 1
365 1 //set output signal
366 1 configData = SIGNAL_FORMAT+0;
367 1 msm_input_command(configData);
368 1 _nop_();
369 1 _nop_();
370 1 _nop_();
371 1
372 1 volumeVal = DB_0;
373 1 samplingFreq = HZ160K;
374 1
375 1 msm_default_strobe_width();
376 1 }
377
378 void msm_start_playback()
379 {
380 1 volatile Uint8 configData;
381 1 msm_modify_strobe_width();
382 1 configData = PLAYBACK_START + samplingFreq;
383 1 msm_input_command(configData);
384 1 msm_default_strobe_width();
385 1 }
386 /**************************for test********************************/
387 /*
388 xdata Byte testBuf[12*1024];
389
390 void init_test_buf()
391 {
392 Uint16 i;
393 Uint32 addr;
394 addr=0x50000;
395 i=0;
396 while (i < 96)
397 {
398 nf_read_tobuf(addr, testBuf+(128*i), 128);
399 // c512_config_read(addr, testBuf+addr, 128);
400 addr += 128;
401 i++;
402 }
403 }*/
404
405
406 Byte msm_senddata(Byte* pBuf, Byte nLen)
407 {
408 1 Byte datalen = 0;
409 1
410 1 msm_modify_strobe_width();
411 1 while (datalen < nLen)
412 1 {
413 2 if (1 == MSM_FULL)
414 2 break;
415 2 msm_input_data(*(pBuf+datalen));
416 2 datalen++;
417 2 }
418 1
419 1 msm_default_strobe_width();
420 1 return datalen;
421 1 }
422
MODULE INFORMATION: STATIC OVERLAYABLE
C51 COMPILER V7.09 MSM9841 09/17/2008 16:09:50 PAGE 8
CODE SIZE = 534 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 3 7
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -