1 /** 2 ************************************************************************** 3 * @file at32f421_conf.h 4 * @brief at32f421 config header file 5 ************************************************************************** 6 * Copyright notice & Disclaimer 7 * 8 * The software Board Support Package (BSP) that is made available to 9 * download from Artery official website is the copyrighted work of Artery. 10 * Artery authorizes customers to use, copy, and distribute the BSP 11 * software and its related documentation for the purpose of design and 12 * development in conjunction with Artery microcontrollers. Use of the 13 * software is governed by this copyright notice and the following disclaimer. 14 * 15 * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, 16 * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, 17 * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR 18 * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, 19 * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, 20 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 21 * 22 ************************************************************************** 23 */ 24 25 /* define to prevent recursive inclusion -------------------------------------*/ 26 #ifndef __AT32F421_CONF_H 27 #define __AT32F421_CONF_H 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 /** 34 * @brief in the following line adjust the value of high speed exernal crystal (hext) 35 * used in your application 36 * 37 * tip: to avoid modifying this file each time you need to use different hext, you 38 * can define the hext value in your toolchain compiler preprocessor. 39 * 40 */ 41 #if !defined HEXT_VALUE 42 #define HEXT_VALUE ((uint32_t)8000000) /*!< value of the high speed exernal crystal in hz */ 43 #endif 44 45 /** 46 * @brief in the following line adjust the high speed exernal crystal (hext) startup 47 * timeout value 48 */ 49 #define HEXT_STARTUP_TIMEOUT ((uint16_t)0x3000) /*!< time out for hext start up */ 50 #define HICK_VALUE ((uint32_t)8000000) /*!< value of the high speed internal clock in hz */ 51 52 /* module define -------------------------------------------------------------*/ 53 #define CRM_MODULE_ENABLED 54 #define TMR_MODULE_ENABLED 55 #define ERTC_MODULE_ENABLED 56 #define GPIO_MODULE_ENABLED 57 #define I2C_MODULE_ENABLED 58 #define USART_MODULE_ENABLED 59 #define PWC_MODULE_ENABLED 60 #define ADC_MODULE_ENABLED 61 #define SPI_MODULE_ENABLED 62 #define DMA_MODULE_ENABLED 63 #define DEBUG_MODULE_ENABLED 64 #define FLASH_MODULE_ENABLED 65 #define CRC_MODULE_ENABLED 66 #define WWDT_MODULE_ENABLED 67 #define WDT_MODULE_ENABLED 68 #define EXINT_MODULE_ENABLED 69 #define MISC_MODULE_ENABLED 70 #define SCFG_MODULE_ENABLED 71 72 /* includes ------------------------------------------------------------------*/ 73 #ifdef CRM_MODULE_ENABLED 74 #include "at32f421_crm.h" 75 #endif 76 #ifdef TMR_MODULE_ENABLED 77 #include "at32f421_tmr.h" 78 #endif 79 #ifdef ERTC_MODULE_ENABLED 80 #include "at32f421_ertc.h" 81 #endif 82 #ifdef GPIO_MODULE_ENABLED 83 #include "at32f421_gpio.h" 84 #endif 85 #ifdef I2C_MODULE_ENABLED 86 #include "at32f421_i2c.h" 87 #endif 88 #ifdef USART_MODULE_ENABLED 89 #include "at32f421_usart.h" 90 #endif 91 #ifdef PWC_MODULE_ENABLED 92 #include "at32f421_pwc.h" 93 #endif 94 #ifdef ADC_MODULE_ENABLED 95 #include "at32f421_adc.h" 96 #endif 97 #ifdef SPI_MODULE_ENABLED 98 #include "at32f421_spi.h" 99 #endif 100 #ifdef DMA_MODULE_ENABLED 101 #include "at32f421_dma.h" 102 #endif 103 #ifdef DEBUG_MODULE_ENABLED 104 #include "at32f421_debug.h" 105 #endif 106 #ifdef FLASH_MODULE_ENABLED 107 #include "at32f421_flash.h" 108 #endif 109 #ifdef CRC_MODULE_ENABLED 110 #include "at32f421_crc.h" 111 #endif 112 #ifdef WWDT_MODULE_ENABLED 113 #include "at32f421_wwdt.h" 114 #endif 115 #ifdef WDT_MODULE_ENABLED 116 #include "at32f421_wdt.h" 117 #endif 118 #ifdef EXINT_MODULE_ENABLED 119 #include "at32f421_exint.h" 120 #endif 121 #ifdef MISC_MODULE_ENABLED 122 #include "at32f421_misc.h" 123 #endif 124 #ifdef SCFG_MODULE_ENABLED 125 #include "at32f421_scfg.h" 126 #endif 127 128 #ifdef __cplusplus 129 } 130 #endif 131 132 #endif 133 134 135