📄 utils.c
字号:
#include "bios.h"
/*
void hex2str(UNS8 *buf,UNS8 *data,UNS8 size)
{
UNS8 i;
UNS8 temp;
for(i=0;i<size;i++)
{
temp = *data;
if( (temp&0xf0) < 0xa0)
{
*buf = ( temp >> 4 ) + 0x30;
}
else
{
*buf = ( temp >> 4 ) + 0x37;
}
buf++;
temp &= 0x0f;
if( temp < 0x09 )
{
*buf = temp +0x30;
}
else
{
*buf = temp + 0x37;
}
buf++;
data ++;
}
}
*/
void Delay_us(UNS16 count)
{
UNS16 i;
for(;count>0;count--)
for(i=0;i<40;i++);
}
void Delay_ms(UNS16 count)
{
for(;count>0;count--)
Delay_us(1000);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -