/* add user code begin Header */ /** ************************************************************************** * @file at32f413_wk_config.h * @brief header file of work bench config ************************************************************************** * Copyright notice & Disclaimer * * The software Board Support Package (BSP) that is made available to * download from Artery official website is the copyrighted work of Artery. * Artery authorizes customers to use, copy, and distribute the BSP * software and its related documentation for the purpose of design and * development in conjunction with Artery microcontrollers. Use of the * software is governed by this copyright notice and the following disclaimer. * * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. * ************************************************************************** */ /* add user code end Header */ /* define to prevent recursive inclusion -----------------------------------*/ #ifndef __AT32F413_WK_CONFIG_H #define __AT32F413_WK_CONFIG_H #ifdef __cplusplus extern "C" { #endif /* includes -----------------------------------------------------------------------*/ #include "at32f413.h" /* private includes -------------------------------------------------------------*/ /* add user code begin private includes */ /* add user code end private includes */ /* exported types -------------------------------------------------------------*/ /* add user code begin exported types */ /* add user code end exported types */ /* exported constants --------------------------------------------------------*/ /* add user code begin exported constants */ /* add user code end exported constants */ /* exported macro ------------------------------------------------------------*/ /* add user code begin exported macro */ /* add user code end exported macro */ /* add user code begin dma define */ /* user can only modify the dma define value */ //#define DMA1_CHANNEL1_BUFFER_SIZE 0 //#define DMA1_CHANNEL1_MEMORY_BASE_ADDR 0 //#define DMA1_CHANNEL1_PERIPHERAL_BASE_ADDR 0 //#define DMA1_CHANNEL2_BUFFER_SIZE 0 //#define DMA1_CHANNEL2_MEMORY_BASE_ADDR 0 //#define DMA1_CHANNEL2_PERIPHERAL_BASE_ADDR 0 //#define DMA1_CHANNEL3_BUFFER_SIZE 0 //#define DMA1_CHANNEL3_MEMORY_BASE_ADDR 0 //#define DMA1_CHANNEL3_PERIPHERAL_BASE_ADDR 0 //#define DMA1_CHANNEL4_BUFFER_SIZE 0 //#define DMA1_CHANNEL4_MEMORY_BASE_ADDR 0 //#define DMA1_CHANNEL4_PERIPHERAL_BASE_ADDR 0 //#define DMA1_CHANNEL5_BUFFER_SIZE 0 //#define DMA1_CHANNEL5_MEMORY_BASE_ADDR 0 //#define DMA1_CHANNEL5_PERIPHERAL_BASE_ADDR 0 //#define DMA1_CHANNEL6_BUFFER_SIZE 0 //#define DMA1_CHANNEL6_MEMORY_BASE_ADDR 0 //#define DMA1_CHANNEL6_PERIPHERAL_BASE_ADDR 0 //#define DMA1_CHANNEL7_BUFFER_SIZE 0 //#define DMA1_CHANNEL7_MEMORY_BASE_ADDR 0 //#define DMA1_CHANNEL7_PERIPHERAL_BASE_ADDR 0 //#define DMA2_CHANNEL1_BUFFER_SIZE 0 //#define DMA2_CHANNEL1_MEMORY_BASE_ADDR 0 //#define DMA2_CHANNEL1_PERIPHERAL_BASE_ADDR 0 //#define DMA2_CHANNEL2_BUFFER_SIZE 0 //#define DMA2_CHANNEL2_MEMORY_BASE_ADDR 0 //#define DMA2_CHANNEL2_PERIPHERAL_BASE_ADDR 0 //#define DMA2_CHANNEL3_BUFFER_SIZE 0 //#define DMA2_CHANNEL3_MEMORY_BASE_ADDR 0 //#define DMA2_CHANNEL3_PERIPHERAL_BASE_ADDR 0 //#define DMA2_CHANNEL4_BUFFER_SIZE 0 //#define DMA2_CHANNEL4_MEMORY_BASE_ADDR 0 //#define DMA2_CHANNEL4_PERIPHERAL_BASE_ADDR 0 //#define DMA2_CHANNEL5_BUFFER_SIZE 0 //#define DMA2_CHANNEL5_MEMORY_BASE_ADDR 0 //#define DMA2_CHANNEL5_PERIPHERAL_BASE_ADDR 0 //#define DMA2_CHANNEL6_BUFFER_SIZE 0 //#define DMA2_CHANNEL6_MEMORY_BASE_ADDR 0 //#define DMA2_CHANNEL6_PERIPHERAL_BASE_ADDR 0 //#define DMA2_CHANNEL7_BUFFER_SIZE 0 //#define DMA2_CHANNEL7_MEMORY_BASE_ADDR 0 //#define DMA2_CHANNEL7_PERIPHERAL_BASE_ADDR 0 /* add user code end dma define */ /* Private defines -------------------------------------------------------------*/ #define MODE2_PIN GPIO_PINS_12 #define MODE2_GPIO_PORT GPIOB #define MODE1_PIN GPIO_PINS_13 #define MODE1_GPIO_PORT GPIOB #define MODE0_PIN GPIO_PINS_14 #define MODE0_GPIO_PORT GPIOB #define CLK_PIN GPIO_PINS_15 #define CLK_GPIO_PORT GPIOB #define DIR_PIN GPIO_PINS_8 #define DIR_GPIO_PORT GPIOA #define EN_PIN GPIO_PINS_9 #define EN_GPIO_PORT GPIOA /* exported functions ------------------------------------------------------- */ /* system clock config. */ void wk_system_clock_config(void); /* config periph clock. */ void wk_periph_clock_config(void); /* init debug function. */ void wk_debug_config(void); /* nvic config. */ void wk_nvic_config(void); /* init gpio function. */ void wk_gpio_config(void); /* init exint function. */ void wk_exint_config(void); /* init can1 function. */ void wk_can1_init(void); /* init usart2 function. */ void wk_usart2_init(void); /* init tmr3 function. */ void wk_tmr3_init(void); /* init tmr4 function. */ void wk_tmr4_init(void); /* init tmr10 function. */ void wk_tmr10_init(void); /* add user code begin exported functions */ /* add user code end exported functions */ #ifdef __cplusplus } #endif #endif