/* USER CODE BEGIN 1 */
/*
 * HAL_layer_protection.c
 *
 *  Created on: 10. 3. 2018
 *      Author: Dušan Benda
 */

#include "HAL_layer_protection.h"

void HAL_start_protection(void)
{
	while((HAL_GPIO_ReadPin(GPIOC,GPIO_PIN_4)) == 0)
	{
		HAL_LED_fault_on();
		HAL_MCU_fault(1);
		HAL_Delay(3000);
	}
	HAL_LED_fault_off();
	HAL_MCU_fault(0);
}

/* USER CODE END 1 */
