main.c

来自「u-blox的GPS模块LEA-5x,三本例子为ATMEGA1280对他的操作的」· C语言 代码 · 共 38 行

C
38
字号
//ICC-AVR application builder : 2008-10-26 13:13:33
// Target : m1280
// Crystal: 14.7456Mhz

#include <iom1280v.h>
#include <macros.h>
#include "uart3.h"
#include "debug.h"
#include "watchdog.h"

void init_devices(void)
{
	CLI(); 
	//--------------------------------
	DDRJ|=(1<<3);	//开GPS模块电源
	PORTJ|=(1<<3);
	//--------------------------------
	DDRG|=(1<<5);	//开GPRS,xflsh电源
	PORTG|=(1<<5);
	//--------------------------------
	watchdog_init();
	uart3_init();
	SEI();
}

void main(void)
{
	init_devices();
	debug_str("GPS ^_^");
	
	while(1)
	{
		watchdog_set();
		uart3_function();
	}
}

⌨️ 快捷键说明

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