main.c

来自「一个通过串口与51通信的AVR的程序,还有一些其实功能」· C语言 代码 · 共 49 行

C
49
字号
#include <header.h>
#include <usart.h>
#include <ctrl.h>
#include <adc.h>

volatile unsigned short  ;

void avr_int()
{
DDRA=0x00;
DDRB=0xfe;
DDRC=0xff;
DDRD=0xfe;
ADC_int();
USART_int();

sei();									//使能全局中断
}



void main()
{
avr_int();
while(1)
	{
	if(USART_dat_reved)
		{
		USART_dat_reved=0;
		ctrl_com();
		}
	}
}

SIGNAL(SIG_USART_RECV)
{
USART_rev();
}

SIGNAL(SIG_SPI)
{
SPI_inr();
}

SIGNAL(SIG_2WIRE_SERIAL)
{
}

⌨️ 快捷键说明

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