reflow-oven-control-sw/stm-firmware/include/reflow-controller/periph-config/oven-driver-hwcfg.h

71 lines
1.9 KiB
C
Raw Permalink Normal View History

2020-05-10 23:13:03 +02:00
/* Reflow Oven Controller
*
* Copyright (C) 2020 Mario Hüttel <mario.huettel@gmx.net>
*
* This file is part of the Reflow Oven Controller Project.
*
* The reflow oven controller is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* The Reflow Oven Control Firmware is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the reflow oven controller project.
* If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file oven-driver-hwcfg.h
* @brief hardware configuration for oven PWM driver
*/
2020-05-10 23:13:03 +02:00
#ifndef __OVEN_DRIVER_HWCFG_H__
#define __OVEN_DRIVER_HWCFG_H__
#include <stm32/stm32f4xx.h>
/**
* @brief Timer to use to generate PWM for oven
*/
2020-05-10 23:13:03 +02:00
#define OVEN_CONTROLLER_PWM_TIMER TIM3
/**
* @brief Port the oven control output is connected to
*/
2020-05-10 23:13:03 +02:00
#define OVEN_CONTROLLER_PORT GPIOB
/**
* @brief The Pin number the oven control output is located at
*/
2020-05-10 23:13:03 +02:00
#define OVEN_CONTROLLER_PIN (0)
/**
* @brief The AHB1ENR Bitmask to enable the clock to the output port #OVEN_CONTROLLER_PORT
*/
2020-05-10 23:13:03 +02:00
#define OVEN_CONTROLLER_PORT_RCC_MASK RCC_AHB1ENR_GPIOBEN
/**
* @brief The APB1ENR bitmask to enable the #OVEN_CONTROLLER_PWM_TIMER
*/
2020-05-10 23:13:03 +02:00
#define OVEN_CONTROLLER_TIM_RCC_MASK RCC_APB1ENR_TIM3EN
/**
* @brief The alternate function #OVEN_CONTROLLER_PWM_TIMER's pwm output is located on #OVEN_CONTROLLER_PORT
*/
2020-05-10 23:13:03 +02:00
#define OVEN_CONTROLLER_PIN_ALTFUNC (2)
2021-01-09 21:59:59 +01:00
/**
* @brief GPIO Port for the safety enable line used by PCB versions > v1.3
*/
#define SSR_SAFETY_EN_PORT GPIOA
#define SSR_SAFETY_EN_PIN (3)
#define SSR_SAFETY_EN_PORT_RCC_MASK RCC_AHB1ENR_GPIOAEN
2020-05-10 23:13:03 +02:00
#endif /* __OVEN_DRIVER_HWCFG_H__ */