Files
DS18B20_Library/py_project/Core/Inc/main.h

68 lines
2.3 KiB
C

/**
******************************************************************************
* @file main.h
* @author MCU Application Team
* @brief Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) Puya Semiconductor Co.
* All rights reserved.</center></h2>
*
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "py32f0xx_hal.h"
#include "interface_config.h"
/* Private includes ----------------------------------------------------------*/
/* Private defines -----------------------------------------------------------*/
#define GPIO_LED_2 GPIO_PIN_1
#define GPIO_LED_3 GPIO_PIN_5
#define GPIO_LED_4 GPIO_PIN_4
#ifdef PY32F002Bx5
#define TIM_MB TIM14
#define __HAL_DBGMCU_FREEZE_TIM_MB __HAL_DBGMCU_FREEZE_TIM14
#define __HAL_RCC_TIM_MB_CLK_ENABLE __HAL_RCC_TIM14_CLK_ENABLE
#define TIM_MB_IRQn TIM14_IRQn
#define TIM_MB_IRQHandler TIM14_IRQHandler
#endif
#ifdef PY32F002Ax5
#define TIM_MB TIM16
#define __HAL_DBGMCU_FREEZE_TIM_MB __HAL_DBGMCU_FREEZE_TIM16
#define __HAL_RCC_TIM_MB_CLK_ENABLE __HAL_RCC_TIM16_CLK_ENABLE
#define TIM_MB_IRQn TIM16_IRQn
#define TIM_MB_IRQHandler TIM16_IRQHandler
#endif
/* Exported variables prototypes ---------------------------------------------*/
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
/************************ (C) COPYRIGHT Puya *****END OF FILE******************/