main.c.bak

来自「电机控制程,用于电机控制,可用于需要的系统中」· BAK 代码 · 共 43 行

BAK
43
字号
#include <iom64v.h>
#include <macros.h>

#define uchar unsigned char
#define uint unsigned int
#define U8 unsigned char
#define true   1
////
U8 g_ucKeyData;
U8 g_ucMomeyData;
U8 g_ucMotorData;
U8 g_ucLedStatus;
void InitData()
{
	g_ucKeyData=0x00;
	g_ucMomeyData=0x00;
	g_ucMotorData=0x00;
	g_ucLedStatus=0x70;
}

void InitTarget()
{
	Time1Init();
	Uart1Init();
	// moneydriver
	DDRA=0XFF;
	PORTA=0x00;
	// motordriver
	DDRC=0XFF;
	PORTC=0X00;
	// turn on the first LED
	DDRF=0xff;
	PORTF=g_ucLedStatus;
	
}
void main()
{
	InitTarget();//
	InitData();
	while(true){
		//dothing;
	}
}

⌨️ 快捷键说明

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