📄 disp.lst
字号:
260 *****************************************************************************/
261 void print_state_record (void)
262 {
263 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_STATE, cgram_rec); /* select record icon */
#else
266 1 LED_ON = 15 - (8 >> ref_state);
267 1 LED_FAST = 1;
268 1 playing = TRUE;
269 1 pause = FALSE;
270 1 #endif
271 1 }
272
273
274
275 /*F**************************************************************************
276 * NAME: print_state_error
277 *----------------------------------------------------------------------------
278 * PARAMS:
279 *
280 * return:
281 *----------------------------------------------------------------------------
282 * PURPOSE:
283 * Print the error icon
284 *----------------------------------------------------------------------------
285 * EXAMPLE:
286 *----------------------------------------------------------------------------
287 * NOTE:
288 *----------------------------------------------------------------------------
289 * REQUIREMENTS:
290 *****************************************************************************/
291 void print_state_error (void)
292 {
293 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_STATE, cgram_error); /* select error icon */
#else
296 1 if (mem_state == MEM_CHIP_ERR_FMT)
297 1 {
298 2 LED_VOL = 1; LED_TREEB=0;
299 2 Fformat();
300 2 if (mem_select_format() == OK) return;
301 2 }
302 1 LED_ON=15;
C51 COMPILER V7.50 DISP 09/20/2005 21:47:47 PAGE 6
303 1 LED_FAST=3;
304 1 #endif
305 1 }
306
307
308
309 /*F**************************************************************************
310 * NAME: print_mode_song
311 *----------------------------------------------------------------------------
312 * PARAMS:
313 *
314 * return:
315 *----------------------------------------------------------------------------
316 * PURPOSE:
317 * Print the song icon on the LCD
318 *----------------------------------------------------------------------------
319 * EXAMPLE:
320 *----------------------------------------------------------------------------
321 * NOTE:
322 *----------------------------------------------------------------------------
323 * REQUIREMENTS:
324 *****************************************************************************/
325 void print_mode_song (void)
326 {
327 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_MODE, cgram_song); /* select song icon */
#else
330 1 LED_ON = (8 >> ref_state);
331 1 LED_FAST = 3;
332 1 #endif
333 1 }
334
335
336 /*F**************************************************************************
337 * NAME: print_mode_voice
338 *----------------------------------------------------------------------------
339 * PARAMS:
340 *
341 * return:
342 *----------------------------------------------------------------------------
343 * PURPOSE:
344 * Print the voice icon on the LCD
345 *----------------------------------------------------------------------------
346 * EXAMPLE:
347 *----------------------------------------------------------------------------
348 * NOTE:
349 *----------------------------------------------------------------------------
350 * REQUIREMENTS:
351 *****************************************************************************/
352 void print_mode_voice (void)
353 {
354 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_MODE, cgram_voice); /* select voice icon */
#else
357 1 LED_ON = (8 >> ref_state);
358 1 LED_FAST = 3;
359 1 #endif
360 1 }
361
362
363 /*F**************************************************************************
364 * NAME: print_mode_mass
C51 COMPILER V7.50 DISP 09/20/2005 21:47:47 PAGE 7
365 *----------------------------------------------------------------------------
366 * PARAMS:
367 *
368 * return:
369 *----------------------------------------------------------------------------
370 * PURPOSE:
371 * Print the mass storage icon on the LCD
372 *----------------------------------------------------------------------------
373 * EXAMPLE:
374 *----------------------------------------------------------------------------
375 * NOTE:
376 *----------------------------------------------------------------------------
377 * REQUIREMENTS:
378 *****************************************************************************/
379 void print_mode_mass (void)
380 {
381 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_MODE, cgram_mass); /* select mass storage icon */
#else
384 1 LED_ON = (8 >> ref_state);
385 1 LED_FAST = 1;
386 1 #endif
387 1 }
388
389
390 /*F**************************************************************************
391 * NAME: print_mode_tool
392 *----------------------------------------------------------------------------
393 * PARAMS:
394 *
395 * return:
396 *----------------------------------------------------------------------------
397 * PURPOSE:
398 * Print the tool icon on the LCD
399 *----------------------------------------------------------------------------
400 * EXAMPLE:
401 *----------------------------------------------------------------------------
402 * NOTE:
403 *----------------------------------------------------------------------------
404 * REQUIREMENTS:
405 *****************************************************************************/
406 void print_mode_tool (void)
407 {
408 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_MODE, cgram_tools); /* select tool icon */
#else
411 1 LED_ON = (8 >> ref_state);
412 1 LED_FAST = 3;
413 1 #endif
414 1 }
415
416
417 /*F**************************************************************************
418 * NAME: print_mode_blank
419 *----------------------------------------------------------------------------
420 *----------------------------------------------------------------------------
421 * PARAMS:
422 *
423 * return:
424 *----------------------------------------------------------------------------
425 * PURPOSE:
426 * Print the blank mode icon on the LCD
C51 COMPILER V7.50 DISP 09/20/2005 21:47:47 PAGE 8
427 *----------------------------------------------------------------------------
428 * EXAMPLE:
429 *----------------------------------------------------------------------------
430 * NOTE:
431 *----------------------------------------------------------------------------
432 * REQUIREMENTS:
433 *****************************************************************************/
434 void print_mode_blank (void)
435 {
436 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_MODE, cgram_blank); /* select blank icon */
#endif
439 1 }
440
441
442 /*F**************************************************************************
443 * NAME: print_sound
444 *----------------------------------------------------------------------------
445 * PARAMS:
446 *
447 * return:
448 *----------------------------------------------------------------------------
449 * PURPOSE:
450 * Print the sound icon
451 *----------------------------------------------------------------------------
452 * EXAMPLE:
453 *----------------------------------------------------------------------------
454 * NOTE:
455 *----------------------------------------------------------------------------
456 * REQUIREMENTS:
457 *****************************************************************************/
458 void print_sound (void)
459 {
460 1 #if CONF_DISPLAY == LCD
switch (song_get_sound())
{
case SND_VOLUME:
{
lcd_cgram(CGRAM_SOUND, cgram_volume);
break;
}
case SND_BASS:
{
lcd_cgram(CGRAM_SOUND, cgram_bass);
break;
}
case SND_MEDIUM:
{
lcd_cgram(CGRAM_SOUND, cgram_medium);
break;
}
case SND_TREBLE:
{
lcd_cgram(CGRAM_SOUND, cgram_treble);
break;
}
}
#endif
485 1 }
486
487
488 /*F**************************************************************************
C51 COMPILER V7.50 DISP 09/20/2005 21:47:47 PAGE 9
489 * NAME: print_sound_level
490 *----------------------------------------------------------------------------
491 * PARAMS:
492 *
493 * return:
494 *----------------------------------------------------------------------------
495 * PURPOSE:
496 * Print the sound level
497 *----------------------------------------------------------------------------
498 * EXAMPLE:
499 *----------------------------------------------------------------------------
500 * NOTE:
501 *----------------------------------------------------------------------------
502 * REQUIREMENTS:
503 *****************************************************************************/
504 void print_sound_level (void)
505 {
506 1 #if CONF_DISPLAY == LCD
lcd_set_cur(POS_SOUND_LVL);
print_decim(song_get_level(), FALSE);
#else
510 1 Byte volume;
511 1
512 1 if (!bargraph) return;
513 1 volume = song_get_level();
514 1 if (func_state == 5)
515 1 {
516 2 LED_ON = 7;
517 2 if (MP3CON & MSK_MPBBST) LED_FAST = 1;
518 2 else LED_FAST = 2;
519 2 return;
520 2 }
521 1 /* volume must be between 0 -> 31 */
522 1 if (volume < 7 ) LED_ON = 0;
523 1 else if (volume < 14) LED_ON = 1;
524 1 else if (volume < 20) LED_ON = 3;
525 1 else if (volume < 26) LED_ON = 7;
526 1 else LED_ON = 15;
527 1 LED_FAST = 3;
528 1 #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -