12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- /********************************* (C) РОТЕК ***********************************
- * @module hw_init
- * @file hw_init.c
- * @version 1.0.0
- * @date XX.XX.XXXX
- * $brief hw_init
- *******************************************************************************
- * @history Version Author Comment
- * XX.XX.XXXX 1.0.0 Telenkov D.A. First release.
- *******************************************************************************
- */
- #include "stm32f4xx.h"
- #include "hw_init.h"
- #include "wdg.h"
- #include "usart.h"
- #include "settings_api.h"
- #include "buttons.h"
- #include "commands_api.h"
- #include "led.h"
- #include "rtc.h"
- #include "gpio.h"
- #include "spi_flash.h"
- #include "stm32_uid.h"
- #include "FreeRTOS.h"
- #include "task.h"
- #ifdef PRINTF_STDLIB
- #include <stdio.h>
- #endif
- #ifdef PRINTF_CUSTOM
- #include "tinystdio.h"
- #endif
- char STM_ID[33];
- /**
- * @brief Инициализация необходимых модулей
- */
- void BT_6702_Init(void)
- {
- uint8_t len;
- gpio_init();
- WDG_Init();
- spi_flash_init();
-
- InitUSART();
-
- SETTINGS_Load();
-
- COM_ReadTestState();
-
- memset(STM_ID, 0, 33);
- GetSTM32IDStr(STM_ID, &len); // Уникальный ID чипа
-
- BUTTON_Init(); // Кнопки
- LED_Init();
-
- TM_RTC_Init(TM_RTC_ClockSource_External);
- // Создает таски для выполнения команд тестера
- xTaskCreate(vTestCommands, "TestProcessing", 2*configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);
-
- printf("Hello world\r\n");
- }
- /********************************* (C) РОТЕК **********************************/
|