Loading files
/**
* __ ____
* / /__ _ __ / __/ __
* / //_/(_)/ /_ / / ___ ____ ___ __ __ / /_
* / ,< / // __/_\ \ / _ \ / __// _ \/ // // __/
* /_/|_|/_/ \__//___// .__//_/ \___/\_,_/ \__/
* /_/ github.com/KitSprout
*
* @file boardConfig.h
* @author KitSprout
* @date 16-Mar-2017
* @brief
*
*/
/* Define to prevent recursive inclusion ---------------------------------------------------*/
#ifndef __BOARDCONFIG_H
#define __BOARDCONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes --------------------------------------------------------------------------------*/
/* Exported types --------------------------------------------------------------------------*/
/* Exported constants ----------------------------------------------------------------------*/
#define KS_HW_BOARD_NAME "QCopterFCs"
#define KS_HW_MCU_NAME "STM32F411CE"
#define KS_HW_CLOCK_SOUCE_HSE
//#define KS_HW_USE_CLOCK_SOUCE_HSI
/* -------- LED and KEY */
#define LED_R_PIN GPIO_PIN_13
#define LED_R_GPIO_PORT GPIOC
#define LED_R_Set() __GPIO_SET(LED_R_GPIO_PORT, LED_R_PIN)
#define LED_R_Reset() __GPIO_RST(LED_R_GPIO_PORT, LED_R_PIN)
#define LED_R_Toggle() __GPIO_TOG(LED_R_GPIO_PORT, LED_R_PIN)
#define LED_G_PIN GPIO_PIN_14
#define LED_G_GPIO_PORT GPIOC
#define LED_G_Set() __GPIO_SET(LED_G_GPIO_PORT, LED_G_PIN)
#define LED_G_Reset() __GPIO_RST(LED_G_GPIO_PORT, LED_G_PIN)
#define LED_G_Toggle() __GPIO_TOG(LED_G_GPIO_PORT, LED_G_PIN)
#define LED_B_PIN GPIO_PIN_15
#define LED_B_GPIO_PORT GPIOC
#define LED_B_Set() __GPIO_SET(LED_B_GPIO_PORT, LED_B_PIN)
#define LED_B_Reset() __GPIO_RST(LED_B_GPIO_PORT, LED_B_PIN)
#define LED_B_Toggle() __GPIO_TOG(LED_B_GPIO_PORT, LED_B_PIN)
#define KEY_PIN GPIO_PIN_2
#define KEY_GPIO_PORT GPIOB
#define KEY_Read() (__GPIO_READ(KEY_GPIO_PORT, KEY_PIN) == KEY_PIN)
/* -------- TIM Timer */
#define TIMER2 TIM2
#define TIMER2_CLK_ENABLE() __HAL_RCC_TIM2_CLK_ENABLE()
#define TIMER2_IRQn TIM2_IRQn
#define TIMER2_TIMx_IRQn_PREEMPT 0x0F
#define TIMER2_TIMx_IRQn_SUB 1
#define TIMER3 TIM3
#define TIMER3_CLK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE()
#define TIMER3_IRQn TIM3_IRQn
#define TIMER3_TIMx_IRQn_PREEMPT 0x0F
#define TIMER3_TIMx_IRQn_SUB 1
#define TIMER4 TIM4
#define TIMER4_CLK_ENABLE() __HAL_RCC_TIM4_CLK_ENABLE()
#define TIMER4_IRQn TIM4_IRQn
#define TIMER4_TIMx_IRQn_PREEMPT 0x0F
#define TIMER4_TIMx_IRQn_SUB 1
/* Exported functions ----------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif
/*************************************** END OF FILE ****************************************/
30a4f6c6cThis file is pinned to the selected release. Download the original to open it in your design tool.