📄 main.c
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -