main.c

来自「自己写的adi bf561的bootloader.实现最简单的串口和flash」· C语言 代码 · 共 52 行

C
52
字号


#include "main.h"
#include "uart\uart.h"


// set up DMA descriptors (one for each frame, then repeat)
// small descriptor model, only start address needs to be fetched

tDMA_descriptor DMA_PPI0_first = 	{&DMA_PPI0_second, sFrame0};
tDMA_descriptor DMA_PPI0_second = 	{&DMA_PPI0_third , sFrame1};
tDMA_descriptor DMA_PPI0_third = 	{&DMA_PPI0_fourth, sFrame2};
tDMA_descriptor DMA_PPI0_fourth = 	{&DMA_PPI0_first , sFrame3};


volatile int current_in_Frame  = -1;		// 0, 1, 2 or 3  ... indicates the last frame that was received COMPLETELY

bool Set_PACK32 = false;
bool Set_Entire_Field = false;


// User program
void main() 
{

	// unblock Core B if dual core operation is desired	
#ifndef RUN_ON_SINGLE_CORE
	*pSICA_SYSCR &= 0xFFDF; // clear bit 5 to unlock  
#endif

	// set Clocks
	Set_PLL( (short)(CORECLK/CLKIN), (short)(CORECLK/SYSCLK));			// sets Core and System Clocks to the values defined in system.h 
 	

	// initialise SDRAM
	InitSDRAM();

	Uart_Init(115200);
	
	printf("\r\nJane : Hello CoreA 0.003 \r\n");

	
	
	// main loop, just wait for interrupts
	while(1) {
		idle();		//   do nothing
	}	// while(1)
		
	
}		// main

⌨️ 快捷键说明

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