Files
VK035_Template/MDK-ARM/Core/App/main.c

59 lines
1.6 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*==============================================================================
* Шаблон проекта для К1921ВК035 с использованием бибилотеки PLIB035
*------------------------------------------------------------------------------
* ЦНИИ СЭТ, Разваляев Алексей <wot890089@mail.ru>
*==============================================================================
* ЦНИИ СЭТ
*==============================================================================
*/
//-- Includes ------------------------------------------------------------------
#include "main.h"
//-- Defines -------------------------------------------------------------------
//-- Peripheral init functions -------------------------------------------------
void periph_init()
{
sysclk_init();
uart_init_first();
adc_init_first();
tmr_init_first();
gpio_init();
#ifdef RETARGET
retarget_init();
#endif
NVIC_SetAllPriorities();
printf("\nAll peripherals inited, SYSCLK = %3d MHz\n", (int)(SystemCoreClock / 1E6));
}
//-- Main ----------------------------------------------------------------------
int main()
{
periph_init();
while (1)
{
};
//return 0;
}
//-- Assert --------------------------------------------------------------------
void Error_Handler(void)
{
__disable_irq();
while (1)
{
}
}
#if defined USE_FULL_ASSERT
void assert_failed(uint8_t* file, uint32_t line)
{
printf("Assert failed: file %s on line %d\n", file, (int)line);
while (1) {
};
}
#endif /* USE_FULL_ASSERT */