📄 disp.c
字号:
* Print the sound level
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_sound_level (void)
{
Byte volume;
if (!bargraph) return;
volume = song_get_level();
if (func_state == 5)
{
LED_ON = 7;
if (MP3CON & MSK_MPBBST) LED_FAST = 1;
else LED_FAST = 2;
return;
}
// volume must be between 0 -> 31
if (volume < 7 ) LED_ON = 0;
else if (volume < 14) LED_ON = 1;
else if (volume < 20) LED_ON = 3;
else if (volume < 26) LED_ON = 7;
else LED_ON = 15;
LED_FAST = 3;
}
/*F**************************************************************************
* NAME: print_voice_vol
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print the voice volume
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_voice_vol (char volume)
{
if (!bargraph) return;
// volume must be between 0 -> 4
LED_ON = (15 >> (4 - volume));
LED_FAST = 3;
}
/*F**************************************************************************
* NAME: print_time
*----------------------------------------------------------------------------
* PARAMS:
* - min: minute to display
* - sec: second to display
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print time on the LCD
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_time (Byte min, Byte sec)
{
print_decim(min, TRUE);
print_decim(sec, FALSE);
}
/*F**************************************************************************
* NAME: print_sec
*----------------------------------------------------------------------------
* PARAMS:
* - sec: second to display
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print second of time on the LCD
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_sec (Byte sec)
{
if (func_timeout>2)
{
func_state = 0;
bargraph = FALSE;
LED_ON = (8 >> ref_state);
if (recording) LED_ON = 15 - LED_ON;
LED_FAST = 1;
song_sound = SND_VOLUME;
}
else func_timeout++;
if (sec);
// print_decim(sec, FALSE);
}
/*F**************************************************************************
* NAME: print_min
*----------------------------------------------------------------------------
* PARAMS:
* - min: minute to display
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print minute of time on the LCD
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_min (Byte min)
{
print_decim(min, TRUE);
}
/*F**************************************************************************
* NAME: print_kbd_lock
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print the lock status
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_kbd_lock (void)
{
}
/*F**************************************************************************
* NAME: print_mem
*----------------------------------------------------------------------------
* PARAMS:
* - mem_type SYMB_DF
* SYMB_MMC1
* SYMB_MMC2
* SYMB_NO_MEM
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print the memory type on the LCD
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_mem (Byte mem_type)
{
if (mem_type);
}
/*F**************************************************************************
* NAME: print_repeat
*----------------------------------------------------------------------------
* PARAMS:
* status: - TRUE: play is repeated after last song
* - FALSE: play is stopped after last song
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print repeat status on the LCD
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_repeat (bit status)
{
if (status);
}
/*F*****************************************************************************
* NAME: print_file_name
*-------------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print to lcd the current file name
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_file_name()
{
disp_name_start(); /* start name display */
}
/*F*****************************************************************************
* NAME: print_file_type
*-------------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print to lcd the current file type
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_file_type()
{
}
/*F*****************************************************************************
* NAME: print_name
*-------------------------------------------------------------------------------
* PARAMS:
* string: pointer on char string
* return:
* TRUE: at the end of the string
* FALSE: in the middle of the string
*----------------------------------------------------------------------------
* PURPOSE:
* Print 14 characters of the file name
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit print_name (char pdata *string)
{
if (string);
return 1;
}
/*F**************************************************************************
* NAME: print_screen
*----------------------------------------------------------------------------
* PARAMS:
* screen: string in code space to print on LCD
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print a screen string on LCD
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_screen (char code *screen)
{
if (screen);
}
/*F**************************************************************************
* NAME: print_fatal_screen
*----------------------------------------------------------------------------
* PARAMS:
* screen: string in code space to print on LCD
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print a screen string on LCD
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_fatal_screen (void)
{
LED_TREEB = LED_BASS=LED_MED = 0;
LED_VOL = 1;
}
/*F**************************************************************************
* NAME: print_string
*----------------------------------------------------------------------------
* PARAMS:
* string: string in code space to print on LCD
* return:
*----------------------------------------------------------------------------
* PURPOSE:
* Print a string on LCD
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_string (char code *string)
{
if (string);
}
/*F****************************************************************************
* NAME: print_decim
*------------------------------------------------------------------------------
* PARAMS:
* b: number to print
* space: TRUE: print ' 0', FALSE: print '00'
* return:
*------------------------------------------------------------------------------
* PURPOSE:
* Print a 2 digits number on LCD '00-99' or ' 0-99'
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void print_decim (Byte b, bit space)
{
if (b && space);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -