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/>.
|
|
|
|
*/
|
|
|
|
|
2020-12-01 21:00:23 +01:00
|
|
|
/**
|
|
|
|
* @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>
|
|
|
|
|
2020-12-01 21:00:23 +01:00
|
|
|
/**
|
|
|
|
* @brief Timer to use to generate PWM for oven
|
|
|
|
*/
|
2020-05-10 23:13:03 +02:00
|
|
|
#define OVEN_CONTROLLER_PWM_TIMER TIM3
|
2020-12-01 21:00:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Port the oven control output is connected to
|
|
|
|
*/
|
2020-05-10 23:13:03 +02:00
|
|
|
#define OVEN_CONTROLLER_PORT GPIOB
|
2020-12-01 21:00:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The Pin number the oven control output is located at
|
|
|
|
*/
|
2020-05-10 23:13:03 +02:00
|
|
|
#define OVEN_CONTROLLER_PIN (0)
|
2020-12-01 21:00:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @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
|
2020-12-01 21:00:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @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
|
2020-12-01 21:00:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @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)
|
|
|
|
|
|
|
|
#endif /* __OVEN_DRIVER_HWCFG_H__ */
|