📄 disp.lst
字号:
270 1 lcd_cgram(CGRAM_MODE, cgram_voice); /* select voice icon */
271 1 }
272
273
274 /*F**************************************************************************
275 * NAME: print_mode_mass
276 *----------------------------------------------------------------------------
277 * PARAMS:
278 *
279 * return:
280 *----------------------------------------------------------------------------
281 * PURPOSE:
282 * Print the mass storage icon on the LCD
283 *----------------------------------------------------------------------------
284 * EXAMPLE:
285 *----------------------------------------------------------------------------
286 * NOTE:
287 *----------------------------------------------------------------------------
288 * REQUIREMENTS:
289 *****************************************************************************/
290 void print_mode_mass (void)
291 {
292 1 lcd_cgram(CGRAM_MODE, cgram_mass); /* select mass storage icon */
293 1 }
294
295
296 /*F**************************************************************************
297 * NAME: print_mode_tool
298 *----------------------------------------------------------------------------
299 * PARAMS:
300 *
301 * return:
302 *----------------------------------------------------------------------------
C51 COMPILER V6.20c DISP 07/10/2002 15:17:45 PAGE 6
303 * PURPOSE:
304 * Print the tool icon on the LCD
305 *----------------------------------------------------------------------------
306 * EXAMPLE:
307 *----------------------------------------------------------------------------
308 * NOTE:
309 *----------------------------------------------------------------------------
310 * REQUIREMENTS:
311 *****************************************************************************/
312 void print_mode_tool (void)
313 {
314 1 lcd_cgram(CGRAM_MODE, cgram_tools); /* select tool icon */
315 1 }
316
317
318 /*F**************************************************************************
319 * NAME: print_mode_blank
320 *----------------------------------------------------------------------------
321 * AUTHOR:
322 *----------------------------------------------------------------------------
323 * PARAMS:
324 *
325 * return:
326 *----------------------------------------------------------------------------
327 * PURPOSE:
328 * Print the blank mode icon on the LCD
329 *----------------------------------------------------------------------------
330 * EXAMPLE:
331 *----------------------------------------------------------------------------
332 * NOTE:
333 *----------------------------------------------------------------------------
334 * REQUIREMENTS:
335 *****************************************************************************/
336 void print_mode_blank (void)
337 {
338 1 lcd_cgram(CGRAM_MODE, cgram_blank); /* select blank icon */
339 1 }
340
341
342 /*F**************************************************************************
343 * NAME: print_sound
344 *----------------------------------------------------------------------------
345 * PARAMS:
346 *
347 * return:
348 *----------------------------------------------------------------------------
349 * PURPOSE:
350 * Print the sound icon
351 *----------------------------------------------------------------------------
352 * EXAMPLE:
353 *----------------------------------------------------------------------------
354 * NOTE:
355 *----------------------------------------------------------------------------
356 * REQUIREMENTS:
357 *****************************************************************************/
358 void print_sound (void)
359 {
360 1 switch (song_get_sound())
361 1 {
362 2 case SND_VOLUME:
363 2 {
364 3 lcd_cgram(CGRAM_SOUND, cgram_volume);
C51 COMPILER V6.20c DISP 07/10/2002 15:17:45 PAGE 7
365 3 break;
366 3 }
367 2 case SND_BASS:
368 2 {
369 3 lcd_cgram(CGRAM_SOUND, cgram_bass);
370 3 break;
371 3 }
372 2 case SND_MEDIUM:
373 2 {
374 3 lcd_cgram(CGRAM_SOUND, cgram_medium);
375 3 break;
376 3 }
377 2 case SND_TREBLE:
378 2 {
379 3 lcd_cgram(CGRAM_SOUND, cgram_treble);
380 3 break;
381 3 }
382 2 }
383 1 }
384
385
386 /*F**************************************************************************
387 * NAME: print_sound_level
388 *----------------------------------------------------------------------------
389 * PARAMS:
390 *
391 * return:
392 *----------------------------------------------------------------------------
393 * PURPOSE:
394 * Print the sound level
395 *----------------------------------------------------------------------------
396 * EXAMPLE:
397 *----------------------------------------------------------------------------
398 * NOTE:
399 *----------------------------------------------------------------------------
400 * REQUIREMENTS:
401 *****************************************************************************/
402 void print_sound_level (void)
403 {
404 1 lcd_set_cur(POS_SOUND_LVL);
405 1 print_decim(song_get_level(), FALSE);
406 1 }
407
408
409 /*F**************************************************************************
410 * NAME: print_voice_vol
411 *----------------------------------------------------------------------------
412 * PARAMS:
413 *
414 * return:
415 *----------------------------------------------------------------------------
416 * PURPOSE:
417 * Print the voice volume
418 *----------------------------------------------------------------------------
419 * EXAMPLE:
420 *----------------------------------------------------------------------------
421 * NOTE:
422 *----------------------------------------------------------------------------
423 * REQUIREMENTS:
424 *****************************************************************************/
425 void print_voice_vol (char volume)
426 {
C51 COMPILER V6.20c DISP 07/10/2002 15:17:45 PAGE 8
427 1 lcd_set_cur(POS_SOUND_LVL);
428 1 lcd_putchar(volume + '0');
429 1 }
430
431
432 /*F**************************************************************************
433 * NAME: print_time
434 *----------------------------------------------------------------------------
435 * PARAMS:
436 * - min: minute to display
437 * - sec: second to display
438 * return:
439 *----------------------------------------------------------------------------
440 * PURPOSE:
441 * Print time on the LCD
442 *----------------------------------------------------------------------------
443 * EXAMPLE:
444 *----------------------------------------------------------------------------
445 * NOTE:
446 *----------------------------------------------------------------------------
447 * REQUIREMENTS:
448 *****************************************************************************/
449 void print_time (Byte min, Byte sec)
450 {
451 1 lcd_set_cur(POS_TIME);
452 1 print_decim(min, TRUE);
453 1 lcd_putchar(':');
454 1 print_decim(sec, FALSE);
455 1 }
456
457
458 /*F**************************************************************************
459 * NAME: print_sec
460 *----------------------------------------------------------------------------
461 * PARAMS:
462 * - sec: second to display
463 * return:
464 *----------------------------------------------------------------------------
465 * PURPOSE:
466 * Print second of time on the LCD
467 *----------------------------------------------------------------------------
468 * EXAMPLE:
469 *----------------------------------------------------------------------------
470 * NOTE:
471 *----------------------------------------------------------------------------
472 * REQUIREMENTS:
473 *****************************************************************************/
474 void print_sec (Byte sec)
475 {
476 1 lcd_set_cur(POS_SECOND);
477 1 print_decim(sec, FALSE);
478 1 }
479
480
481 /*F**************************************************************************
482 * NAME: print_min
483 *----------------------------------------------------------------------------
484 * PARAMS:
485 * - min: minute to display
486 * return:
487 *----------------------------------------------------------------------------
488 * PURPOSE:
C51 COMPILER V6.20c DISP 07/10/2002 15:17:45 PAGE 9
489 * Print minute of time on the LCD
490 *----------------------------------------------------------------------------
491 * EXAMPLE:
492 *----------------------------------------------------------------------------
493 * NOTE:
494 *----------------------------------------------------------------------------
495 * REQUIREMENTS:
496 *****************************************************************************/
497 void print_min (Byte min)
498 {
499 1 lcd_set_cur(POS_MINUTE);
500 1 print_decim(min, TRUE);
501 1 }
502
503
504 /*F**************************************************************************
505 * NAME: print_kbd_lock
506 *----------------------------------------------------------------------------
507 * PARAMS:
508 *
509 * return:
510 *----------------------------------------------------------------------------
511 * PURPOSE:
512 * Print the lock status
513 *----------------------------------------------------------------------------
514 * EXAMPLE:
515 *----------------------------------------------------------------------------
516 * NOTE:
517 *----------------------------------------------------------------------------
518 * REQUIREMENTS:
519 *****************************************************************************/
520 void print_kbd_lock (void)
521 {
522 1 if (gl_kbd_lock)
523 1 {
524 2 lcd_cgram(CGRAM_LOCK, cgram_lock); /* init lock icon to locked */
525 2 }
526 1 else
527 1 {
528 2 lcd_cgram(CGRAM_LOCK, cgram_blank); /* init lock icon to locked */
529 2 }
530 1 }
531
532
533 /*F**************************************************************************
534 * NAME: print_mem
535 *----------------------------------------------------------------------------
536 * PARAMS:
537 * - mem_type SYMB_DF
538 * SYMB_MMC1
539 * SYMB_MMC2
540 * SYMB_NO_MEM
541 * return:
542 *----------------------------------------------------------------------------
543 * PURPOSE:
544 * Print the memory type on the LCD
545 *----------------------------------------------------------------------------
546 * EXAMPLE:
547 *----------------------------------------------------------------------------
548 * NOTE:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -