}
void main(void)
{
int ecode=0;
int temp=0;
CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);
Init_UART1();
Init_GPIO();
// Init_Timer4();
Init_Timer1();
enableInterrupts();
while (1)
{
ecode=(TIM1->CNTRH<<8)|TIM1->CNTRL;
if(ecode!=temp)
sendswj_int(ecode);
temp=ecode;
}
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval : None
*/
void assert_failed(u8* file, u32 line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
while (1)
{
}
}
#endif
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/