2013-01-17 05:11 PM
what is this for
/** ****************************************************************************** * @file STM32vldiscovery.h * @author MCD Application Team * @version V1.0.0 * @date 09/13/2010 * @brief Header file for STM32vldiscovery.c module. ****************************************************************************** * @copy * * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * * <h2><center>© COPYRIGHT 2010 STMicroelectronics</center></h2> */ /* Define to prevent recursive inclusion -------------------------------------*/&sharpifndef __STM32F100_Dicovery_H
&sharpdefine __STM32F100_Dicovery_H //this one, is see this in every header... what is their function? &sharpifdef __cplusplus extern ''C'' { &sharpendif /* Includes ------------------------------------------------------------------*/ &sharpinclude ''STM32f10x.h'' /** @addtogroup Utilities * @{ */ /** @addtogroup STM32vldiscovery #new-question-=-new-thread #include-guard #include-guard #include-guard #learning-c
2013-01-18 07:41 AM
thanks guys for your help.. additional question
/* GPIOA Periph clock enable */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); /* Configure PA0 .. PA7 in output pushpull mode */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_Init(GPIOA, &GPIO_InitStructure); /* Configure PA8 .. PA15 in input, pulled up mode */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; GPIO_Init(GPIOA, &GPIO_InitStructure); GPIOA->ODR = GPIOA->IDR >> 8; // Mirror high ordered inputs to low ordered outputs could you explain to me the bold one especially ''8'' and IDR2013-01-18 07:58 AM
You should start a new thread for a new question - otherwise the thread title becomes meaningless, and it all gets very confusing...