/*============================================================================== * Шаблон проекта для К1921ВК035 с использованием бибилотеки PLIB035 *------------------------------------------------------------------------------ * ЦНИИ СЭТ, Разваляев Алексей *============================================================================== * ЦНИИ СЭТ *============================================================================== */ //-- 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 */