⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 console.c

📁 MP3播放器源代码, VS1003B
💻 C
字号:
#include "board.h"#include "console.h"/**\file console.c * Console function implementations. */ /** hexadecimal character set */extern code const unsigned char lcd_hexchars[17];/** Write a Code Constant string to console */void ConsoleWrite(char code *str){  while (*str)    {      ConsolePutChar (*str++);    }}/** Print a 16-bit hex value on Console */void ConsolePutHex16 (unsigned int value){  ConsolePutChar(lcd_hexchars[value>>12]);  ConsolePutChar(lcd_hexchars[(value>>8)&0xf]);  ConsolePutChar(lcd_hexchars[(value>>4)&0xf]);  ConsolePutChar(lcd_hexchars[(value)&0xf]);}/** Print an 8-bit hex value on Console */void ConsolePutHex8 (unsigned char value){  ConsolePutChar(lcd_hexchars[(value>>4)&0xf]);  ConsolePutChar(lcd_hexchars[(value)&0xf]);}/** Print a 16-bit unsigned integer value on Console */void ConsolePutUInt(unsigned long value){  xdata unsigned char valueString[10];  char c;  for (c=0; c<10; c++){    valueString[c]=value % 10;    value = value / 10;  }  c=9;  while ((valueString[c]==0) && (c!=0))    c--;  for (;c!=0;c--)    ConsolePutChar('0'+valueString[c]);  ConsolePutChar('0'+valueString[0]);  ConsolePutChar(' ');}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -