main.c

来自「s32410串口demo, 开发工具ads1.2,实现串口通信.」· C语言 代码 · 共 63 行

C
63
字号
# include <stdarg.h>
# include <stdio.h>
# include "speed.h"
# include "common.h"
# include "Board.h"
# include "Interrupt.h"
# include "UART.H"


int mmain()
{
	int i=0;
	char buf[100];	
	Port_Init();
	//All the interrupt is IRQ interrupt
	SetIntMod(0x00000000); 
	//only uart0 interrupt is available 
	SetIntMask(0xEFFFFFFF);
	//priority keep no change
	SetPriority(0x00000000);
	SetIntSubMake(0x00000001);
	UartInitDefault();
	Delay(1000);
	UART_Printf("Hello World\r\n");
	UART_Printf("VeryGood\r\n");
	return 0;
}

int  do_undefined_instruction()
{
	return 0;
}

int  do_software_interrupt()
{
	return 0;
}

int  do_prefetch_abort()
{
	return 0;
}

int	do_data_abort()
{
	return 0;
}

int	do_not_used()
{
	return 0;
}

int	do_irq()
{
	UART_Printf("IRQ\n");
	return 0;
}

int	do_frq()
{
	return 0;
}

⌨️ 快捷键说明

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