beep.c 521 Bytes
/*
 * beep.c
 *
 *  Created on: Oct 28, 2019
 *      Author: Yasin
 */

/* Includes ------------------------------------------------------------------*/
#include "beep.h"
#include "tim.h"

/**
 * crazy beep
 */
void BEEP_call()
{
  BEEP_Reset();
  // 使能TIM3\TIM6中断
  HAL_TIM_Base_Start_IT(&htim3);
  HAL_TIM_Base_Start_IT(&htim6);
}

/**
 * close crazy beep
 */
void BEEP_close()
{
  BEEP_Reset();
  HAL_TIM_Base_Stop_IT(&htim3);
  HAL_Delay(10);
  HAL_TIM_Base_Stop_IT(&htim6);
}