4主函数部分:
int main(void)
{
// int count;
uint32 judge;
NVIC_SetVectorTable(NVIC_VectTab_FLASH,0x00); // NVIC_VectTab_FLASH=0x08000000
// RCC_Config();
SysTick_Init();
GPIO_Config();
USART1_Init(19200);
NVIC_Config();
FLASH_SetLatency(FLASH_Latency_1); //延时2个时钟周期
/* Enable Prefetch Buffer --使能预取指缓存*/
FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
Dma_Init();
/* Get Current Data Counter value before transfer begins */
CurrDataCounter = DMA_GetCurrDataCounter(DMA1_Channel1); //返回当前DMA通道x, 剩余待传输数据数目
while( CurrDataCounter!=0) ;
judge = memcmp(SRC_Const_Buffer,DST_Buffer,BufferSize);
if(0==judge)
{
USART1_SendData(" Same !!!\r\n",sizeof(" Same !!!\r\n"));
}
else
{
USART1_SendData(" different !!!\r\n",sizeof(" different !!!\r\n"));
}
Delay_ms(1);
}
|