📄 main.c
字号:
#include <avr/io.h>
#include <avr/delay.h>
#include <math.h>
#include "H146IT01.h"
void PortInit(void)
{
DDRA = 0xff;
DDRC = 0xff;
DDRD = 0xff;
}
int main(void)
{
double x,y;
PortInit();
LCDInit();
DisplayScreen(0xff, 0x00, 0x00);
for(x=0; x<120; x+=0.1)
{
y = sin(x/10)*30;
PutPixel(x, (int)(y+80), 0x00, 0xff, 0x0f);
PutPixel(x+10, (int)(y+80), 0xf0, 0x3f, 0xf3);
}
PutString(0, 0, "I'm what I am, I'm ldqmoon!", 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x23);
PutString(0,110, "www. acgclub.com", 0x26, 0x0f, 0x82, 0xac, 0x43, 0x65);
while(1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -