You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
799 B
C

#include "debug.h"
/*********************************************************************
* @fn main
*
* @brief Main program.
*
* @return none
*/
int main(void)
{
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
SystemCoreClockUpdate();
Delay_Init();
#if (SDI_PRINT == SDI_PR_OPEN)
SDI_Printf_Enable();
#else
USART_Printf_Init(115200);
#endif
printf("SystemClk:%d\r\n",SystemCoreClock);
printf( "ChipID:%08x\r\n", DBGMCU_GetCHIPID() );
USARTx_CFG();
while(1)
{
while(USART_GetFlagStatus(USART1, USART_FLAG_RXNE) == RESET)
{
/* waiting for receiving finish */
}
while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET)
{
/* waiting for sending finish */
}
}
}