###################################################
-all: libstm32f4.a $(PROJ_NAME).elf fft_test.elf ut_dac.elf
+all: libstm32f4.a $(PROJ_NAME).elf fft_test.elf dac_ut.elf
dl/$(PERIPHLIBZIP):
mkdir -p dl
DAC_TEST=$(PERIPHLIBDIR)/Project/STM32F4xx_StdPeriph_Examples/DAC/DAC_SignalsGeneration
DAC_TEST_SRCS=\
-src/ut_dac.c \
-$(DAC_TEST)/stm32f4xx_it.c \
-$(DAC_TEST)/system_stm32f4xx.c \
-$(PERIPHLIBDIR)/Utilities/STM32_EVAL/STM3240_41_G_EVAL/stm324xg_eval.c \
-gdb_stdio.c \
+src/dac_ut.c \
+src/system_stm32f4xx.c \
src/startup_stm32f4xx.s \
src/init.c
-ut_dac.elf: $(DAC_TEST_SRCS)
+#$(DAC_TEST)/stm32f4xx_it.c \
+#$(DAC_TEST)/system_stm32f4xx.c \
+#(PERIPHLIBDIR)/Utilities/STM32_EVAL/STM3240_41_G_EVAL/stm324xg_eval.c \
+
+dac_ut.elf: $(DAC_TEST_SRCS)
$(CC) $(CFLAGS) -DUSE_STM324xG_EVAL -I$(PERIPHLIBDIR)/Utilities/STM32_EVAL/STM3240_41_G_EVAL -I$(PERIPHLIBDIR)/Utilities/STM32_EVAL/Common $^ -o $@ $(LIBPATHS) $(LIBS)
clean:
--- /dev/null
+/**\r
+ ******************************************************************************\r
+ * @file DAC/DAC_SignalsGeneration/main.h \r
+ * @author MCD Application Team\r
+ * @version V1.1.0\r
+ * @date 18-January-2013\r
+ * @brief Header for main.c module\r
+ ******************************************************************************\r
+ * @attention\r
+ *\r
+ * <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>\r
+ *\r
+ * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");\r
+ * You may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at:\r
+ *\r
+ * http://www.st.com/software_license_agreement_liberty_v2\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software \r
+ * distributed under the License is distributed on an "AS IS" BASIS, \r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ ******************************************************************************\r
+ */\r
+ \r
+/* Define to prevent recursive inclusion -------------------------------------*/\r
+#ifndef __MAIN_H\r
+#define __MAIN_H\r
+\r
+/* Includes ------------------------------------------------------------------*/\r
+#include "stm32f4xx.h"\r
+\r
+#if defined (USE_STM324xG_EVAL)\r
+ #include "stm324xg_eval.h"\r
+\r
+#elif defined (USE_STM324x7I_EVAL) \r
+ #include "stm324x7i_eval.h"\r
+\r
+#else\r
+ #error "Please select first the Evaluation board used in your application (in Project Options)"\r
+#endif\r
+\r
+/* Exported types ------------------------------------------------------------*/\r
+/* Exported constants --------------------------------------------------------*/\r
+/* Exported macro ------------------------------------------------------------*/\r
+#if defined (USE_STM324xG_EVAL)\r
+\r
+ #define DAC_DHR12R2_ADDRESS 0x40007414\r
+ #define DAC_DHR8R1_ADDRESS 0x40007410\r
+\r
+#else /* defined (USE_STM324x7I_EVAL)*/ \r
+\r
+ #define DAC_DHR12R2_ADDRESS 0x40007414\r
+ #define DAC_DHR8R1_ADDRESS 0x40007410\r
+\r
+#endif\r
+/* Exported functions ------------------------------------------------------- */\r
+\r
+#endif /* __MAIN_H */\r
+\r
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/\r
--- /dev/null
+/*---------------------------------------------------------------------------*\\r
+\r
+ FILE........: dac_ut.c\r
+ AUTHOR......: David Rowe\r
+ DATE CREATED: May 31 2013\r
+\r
+ Plays a 500 Hz sine wave sampled at 16 kHz out of PF5 on a Discovery board.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+/*\r
+ Copyright (C) 2013 David Rowe\r
+\r
+ All rights reserved.\r
+\r
+ This program is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU Lesser General Public License version 2.1, as\r
+ published by the Free Software Foundation. This program is\r
+ distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public\r
+ License for more details.\r
+\r
+ You should have received a copy of the GNU Lesser General Public License\r
+ along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+*/\r
+\r
+\r
+/* Modfied version of the following: */\r
+\r
+/**\r
+ ******************************************************************************\r
+ * @file DAC/DAC_SignalsGeneration/main.c \r
+ * @author MCD Application Team\r
+ * @version V1.1.0\r
+ * @date 18-January-2013\r
+ * @brief Main program body.\r
+ ******************************************************************************\r
+ * @attention\r
+ *\r
+ * <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>\r
+ *\r
+ * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");\r
+ * You may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at:\r
+ *\r
+ * http://www.st.com/software_license_agreement_liberty_v2\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software \r
+ * distributed under the License is distributed on an "AS IS" BASIS, \r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ ******************************************************************************\r
+ */\r
+\r
+#include "stm32f4xx.h"\r
+\r
+#define DAC_DHR12R2_ADDRESS 0x40007414\r
+\r
+DAC_InitTypeDef DAC_InitStructure;\r
+\r
+/* 32 sample sine wave which at Fs=16kHz will be 500Hz. Note samples\r
+ are unsigned */\r
+\r
+const uint16_t aSine12bit[32] = {\r
+ 2047, 2447, 2831, 3185, 3498, 3750, 3939, 4056, 4095, 4056,\r
+ 3939, 3750, 3495, 3185, 2831, 2447, 2047, 1647, 1263, 909, \r
+ 599, 344, 155, 38, 0, 38, 155, 344, 599, 909, 1263, 1647};\r
+\r
+static void TIM6_Config(void);\r
+static void DAC_Ch2_SineWaveConfig(void);\r
+\r
+/* Private functions ---------------------------------------------------------*/\r
+\r
+int main(void)\r
+{\r
+ /*!< At this stage the microcontroller clock setting is already configured, \r
+ this is done through SystemInit() function which is called from startup\r
+ files (startup_stm32f40xx.s/startup_stm32f427x.s) before to branch to \r
+ application main. \r
+ To reconfigure the default setting of SystemInit() function, refer to\r
+ system_stm32f4xx.c file\r
+ */ \r
+\r
+ /* Preconfiguration before using DAC----------------------------------------*/\r
+ GPIO_InitTypeDef GPIO_InitStructure;\r
+\r
+ /* DMA1 clock enable */\r
+ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA1, ENABLE);\r
+ /* GPIOA clock enable (to be used with DAC) */\r
+ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); \r
+ /* DAC Periph clock enable */\r
+ RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE);\r
+\r
+ /* DAC channel 1 & 2 (DAC_OUT1 = PA.4)(DAC_OUT2 = PA.5) configuration */\r
+ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4 | GPIO_Pin_5;\r
+ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AN;\r
+ GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;\r
+ GPIO_Init(GPIOA, &GPIO_InitStructure);\r
+\r
+ /* TIM6 Configuration ------------------------------------------------------*/\r
+\r
+ TIM6_Config(); \r
+ \r
+ DAC_Ch2_SineWaveConfig();\r
+\r
+ while (1);\r
+}\r
+\r
+/** \r
+ * @brief TIM6 Configuration\r
+ * @note TIM6 configuration is based on APB1 frequency\r
+ * @note TIM6 Update event occurs each TIM6CLK/256 \r
+ * @param None\r
+ * @retval None\r
+ */\r
+static void TIM6_Config(void)\r
+{\r
+ TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;\r
+ /* TIM6 Periph clock enable */\r
+ RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, ENABLE);\r
+ \r
+ /* --------------------------------------------------------\r
+ \r
+ TIM3 input clock (TIM6CLK) is set to 2 * APB1 clock (PCLK1), since\r
+ APB1 prescaler is different from 1 (see system_stm32f4xx.c and Fig\r
+ 13 clock tree figure in DM0031020.pdf).\r
+\r
+ Sample rate Fs = 2*PCLK1/TIM_ClockDivision \r
+ = (HCLK/2)/TIM_ClockDivision\r
+ \r
+ ----------------------------------------------------------- */\r
+\r
+ /* Time base configuration */\r
+ TIM_TimeBaseStructInit(&TIM_TimeBaseStructure); \r
+ TIM_TimeBaseStructure.TIM_Period = 5250; \r
+ TIM_TimeBaseStructure.TIM_Prescaler = 0; \r
+ TIM_TimeBaseStructure.TIM_ClockDivision = 0; \r
+ TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; \r
+ TIM_TimeBaseInit(TIM6, &TIM_TimeBaseStructure);\r
+\r
+ /* TIM6 TRGO selection */\r
+ TIM_SelectOutputTrigger(TIM6, TIM_TRGOSource_Update);\r
+ \r
+ /* TIM6 enable counter */\r
+ TIM_Cmd(TIM6, ENABLE);\r
+}\r
+\r
+/**\r
+ * @brief DAC Channel2 SineWave Configuration\r
+ * @param None\r
+ * @retval None\r
+ */\r
+static void DAC_Ch2_SineWaveConfig(void)\r
+{\r
+ DMA_InitTypeDef DMA_InitStructure;\r
+ \r
+ /* DAC channel2 Configuration */\r
+ DAC_InitStructure.DAC_Trigger = DAC_Trigger_T6_TRGO;\r
+ DAC_InitStructure.DAC_WaveGeneration = DAC_WaveGeneration_None;\r
+ DAC_InitStructure.DAC_OutputBuffer = DAC_OutputBuffer_Enable;\r
+ DAC_Init(DAC_Channel_2, &DAC_InitStructure);\r
+\r
+ /* DMA1_Stream6 channel7 configuration **************************************/\r
+ DMA_DeInit(DMA1_Stream6);\r
+ DMA_InitStructure.DMA_Channel = DMA_Channel_7; \r
+ DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)DAC_DHR12R2_ADDRESS;\r
+ DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)&aSine12bit;\r
+ DMA_InitStructure.DMA_DIR = DMA_DIR_MemoryToPeripheral;\r
+ DMA_InitStructure.DMA_BufferSize = 32;\r
+ DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;\r
+ DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;\r
+ DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;\r
+ DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;\r
+ DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;\r
+ DMA_InitStructure.DMA_Priority = DMA_Priority_High;\r
+ DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Disable; \r
+ DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_HalfFull;\r
+ DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;\r
+ DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single;\r
+ DMA_Init(DMA1_Stream6, &DMA_InitStructure);\r
+\r
+ /* Enable DMA1_Stream6 */\r
+ DMA_Cmd(DMA1_Stream6, ENABLE);\r
+\r
+ /* Enable DAC Channel2 */\r
+ DAC_Cmd(DAC_Channel_2, ENABLE);\r
+\r
+ /* Enable DMA for DAC Channel2 */\r
+ DAC_DMACmd(DAC_Channel_2, ENABLE);\r
+}\r
+\r
+++ /dev/null
-/**\r
- ******************************************************************************\r
- * @file DAC/DAC_SignalsGeneration/main.c \r
- * @author MCD Application Team\r
- * @version V1.1.0\r
- * @date 18-January-2013\r
- * @brief Main program body.\r
- ******************************************************************************\r
- * @attention\r
- *\r
- * <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>\r
- *\r
- * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");\r
- * You may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at:\r
- *\r
- * http://www.st.com/software_license_agreement_liberty_v2\r
- *\r
- * Unless required by applicable law or agreed to in writing, software \r
- * distributed under the License is distributed on an "AS IS" BASIS, \r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *\r
- ******************************************************************************\r
- */\r
-\r
-/* Includes ------------------------------------------------------------------*/\r
-#include "ut_dac.h"\r
-#include "gdb_stdio.h"\r
-\r
-#ifdef __EMBEDDED__\r
-#define printf gdb_stdio_printf\r
-#define fopen gdb_stdio_fopen\r
-#define fclose gdb_stdio_fclose\r
-#define fread gdb_stdio_fread\r
-#define fwrite gdb_stdio_fwrite\r
-#endif\r
-\r
-/** @addtogroup STM32F4xx_StdPeriph_Examples\r
- * @{\r
- */\r
-\r
-/** @addtogroup DAC_SignalsGeneration\r
- * @{\r
- */ \r
-\r
-/* Private typedef -----------------------------------------------------------*/\r
-/* Private define ------------------------------------------------------------*/\r
-/* Private macro -------------------------------------------------------------*/\r
-/* Private variables ---------------------------------------------------------*/\r
-DAC_InitTypeDef DAC_InitStructure;\r
-\r
-\r
-const uint16_t aSine12bit[32] = {\r
- 2047, 2447, 2831, 3185, 3498, 3750, 3939, 4056, 4095, 4056,\r
- 3939, 3750, 3495, 3185, 2831, 2447, 2047, 1647, 1263, 909, \r
- 599, 344, 155, 38, 0, 38, 155, 344, 599, 909, 1263, 1647};\r
-\r
-const uint8_t aEscalator8bit[6] = {0x0, 0x33, 0x66, 0x99, 0xCC, 0xFF};\r
-\r
-__IO uint8_t ubSelectedWavesForm = 1;\r
-__IO uint8_t ubKeyPressed = SET; \r
-\r
-/* Private function prototypes -----------------------------------------------*/\r
-static void TIM6_Config(void);\r
-\r
-static void DAC_Ch2_SineWaveConfig(void);\r
-\r
-/* Private functions ---------------------------------------------------------*/\r
-\r
-/**\r
- * @brief Main program\r
- * @param None\r
- * @retval None\r
- */\r
-int main(void)\r
-{\r
- /*!< At this stage the microcontroller clock setting is already configured, \r
- this is done through SystemInit() function which is called from startup\r
- files (startup_stm32f40xx.s/startup_stm32f427x.s) before to branch to \r
- application main. \r
- To reconfigure the default setting of SystemInit() function, refer to\r
- system_stm32f4xx.c file\r
- */ \r
-\r
- /* Preconfiguration before using DAC----------------------------------------*/\r
- GPIO_InitTypeDef GPIO_InitStructure;\r
-\r
- /* DMA1 clock enable */\r
- RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA1, ENABLE);\r
- /* GPIOA clock enable (to be used with DAC) */\r
- RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); \r
- /* DAC Periph clock enable */\r
- RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE);\r
-\r
- /* DAC channel 1 & 2 (DAC_OUT1 = PA.4)(DAC_OUT2 = PA.5) configuration */\r
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4 | GPIO_Pin_5;\r
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AN;\r
- GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;\r
- GPIO_Init(GPIOA, &GPIO_InitStructure);\r
-\r
- /* TIM6 Configuration ------------------------------------------------------*/\r
-\r
- TIM6_Config(); \r
- \r
- DAC_Ch2_SineWaveConfig();\r
-\r
- while (1);\r
-}\r
-\r
-/** \r
- * @brief TIM6 Configuration\r
- * @note TIM6 configuration is based on APB1 frequency\r
- * @note TIM6 Update event occurs each TIM6CLK/256 \r
- * @param None\r
- * @retval None\r
- */\r
-static void TIM6_Config(void)\r
-{\r
- TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;\r
- /* TIM6 Periph clock enable */\r
- RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, ENABLE);\r
- \r
- /* --------------------------------------------------------\r
- TIM3 input clock (TIM6CLK) is set to 2 * APB1 clock (PCLK1), \r
- since APB1 prescaler is different from 1. \r
- TIM6CLK = 2 * PCLK1 \r
- TIM6CLK = HCLK / 2 = SystemCoreClock /2 \r
- \r
- TIM6 Update event occurs each TIM6CLK/256 \r
-\r
- Note: \r
- SystemCoreClock variable holds HCLK frequency and is defined in system_stm32f4xx.c file.\r
- Each time the core clock (HCLK) changes, user had to call SystemCoreClockUpdate()\r
- function to update SystemCoreClock variable value. Otherwise, any configuration\r
- based on this variable will be incorrect. \r
-\r
- ----------------------------------------------------------- */\r
- /* Time base configuration */\r
- TIM_TimeBaseStructInit(&TIM_TimeBaseStructure); \r
- TIM_TimeBaseStructure.TIM_Period = 1679; \r
- TIM_TimeBaseStructure.TIM_Prescaler = 0; \r
- TIM_TimeBaseStructure.TIM_ClockDivision = 0; \r
- TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; \r
- TIM_TimeBaseInit(TIM6, &TIM_TimeBaseStructure);\r
-\r
- /* TIM6 TRGO selection */\r
- TIM_SelectOutputTrigger(TIM6, TIM_TRGOSource_Update);\r
- \r
- /* TIM6 enable counter */\r
- TIM_Cmd(TIM6, ENABLE);\r
-}\r
-\r
-/**\r
- * @brief DAC Channel2 SineWave Configuration\r
- * @param None\r
- * @retval None\r
- */\r
-static void DAC_Ch2_SineWaveConfig(void)\r
-{\r
- DMA_InitTypeDef DMA_InitStructure;\r
- \r
- /* DAC channel2 Configuration */\r
- DAC_InitStructure.DAC_Trigger = DAC_Trigger_T6_TRGO;\r
- DAC_InitStructure.DAC_WaveGeneration = DAC_WaveGeneration_None;\r
- DAC_InitStructure.DAC_OutputBuffer = DAC_OutputBuffer_Enable;\r
- DAC_Init(DAC_Channel_2, &DAC_InitStructure);\r
-\r
- /* DMA1_Stream6 channel7 configuration **************************************/\r
- DMA_DeInit(DMA1_Stream6);\r
- DMA_InitStructure.DMA_Channel = DMA_Channel_7; \r
- DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)DAC_DHR12R2_ADDRESS;\r
- DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)&aSine12bit;\r
- DMA_InitStructure.DMA_DIR = DMA_DIR_MemoryToPeripheral;\r
- DMA_InitStructure.DMA_BufferSize = 32;\r
- DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;\r
- DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;\r
- DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;\r
- DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;\r
- DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;\r
- DMA_InitStructure.DMA_Priority = DMA_Priority_High;\r
- DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Disable; \r
- DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_HalfFull;\r
- DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;\r
- DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single;\r
- DMA_Init(DMA1_Stream6, &DMA_InitStructure);\r
-\r
- /* Enable DMA1_Stream6 */\r
- DMA_Cmd(DMA1_Stream6, ENABLE);\r
-\r
- /* Enable DAC Channel2 */\r
- DAC_Cmd(DAC_Channel_2, ENABLE);\r
-\r
- /* Enable DMA for DAC Channel2 */\r
- DAC_DMACmd(DAC_Channel_2, ENABLE);\r
-}\r
-\r
+++ /dev/null
-/**\r
- ******************************************************************************\r
- * @file DAC/DAC_SignalsGeneration/main.h \r
- * @author MCD Application Team\r
- * @version V1.1.0\r
- * @date 18-January-2013\r
- * @brief Header for main.c module\r
- ******************************************************************************\r
- * @attention\r
- *\r
- * <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>\r
- *\r
- * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");\r
- * You may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at:\r
- *\r
- * http://www.st.com/software_license_agreement_liberty_v2\r
- *\r
- * Unless required by applicable law or agreed to in writing, software \r
- * distributed under the License is distributed on an "AS IS" BASIS, \r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *\r
- ******************************************************************************\r
- */\r
- \r
-/* Define to prevent recursive inclusion -------------------------------------*/\r
-#ifndef __MAIN_H\r
-#define __MAIN_H\r
-\r
-/* Includes ------------------------------------------------------------------*/\r
-#include "stm32f4xx.h"\r
-\r
-#if defined (USE_STM324xG_EVAL)\r
- #include "stm324xg_eval.h"\r
-\r
-#elif defined (USE_STM324x7I_EVAL) \r
- #include "stm324x7i_eval.h"\r
-\r
-#else\r
- #error "Please select first the Evaluation board used in your application (in Project Options)"\r
-#endif\r
-\r
-/* Exported types ------------------------------------------------------------*/\r
-/* Exported constants --------------------------------------------------------*/\r
-/* Exported macro ------------------------------------------------------------*/\r
-#if defined (USE_STM324xG_EVAL)\r
-\r
- #define DAC_DHR12R2_ADDRESS 0x40007414\r
- #define DAC_DHR8R1_ADDRESS 0x40007410\r
-\r
-#else /* defined (USE_STM324x7I_EVAL)*/ \r
-\r
- #define DAC_DHR12R2_ADDRESS 0x40007414\r
- #define DAC_DHR8R1_ADDRESS 0x40007410\r
-\r
-#endif\r
-/* Exported functions ------------------------------------------------------- */\r
-\r
-#endif /* __MAIN_H */\r
-\r
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/\r