1/**2* @brief Initializes the GPIOx peripheral according to the specified3* parameters in the GPIO_InitStruct.4* @param GPIOx: where x can be (A..G) to select the GPIO peripheral.5* @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that6* contains the configuration infor...
GPIO_InitStructure,这个 结构体 的名字叫GPIO_InitStructure。加个“&”是指这个结构体的首地址当 形参 传进这个函数。
2 * @brief Initializes the GPIOx peripheral according to the specified 3 * parameters in the GPIO_InitStruct. 4 * @param GPIOx: where x can be (A..G) to select the GPIO peripheral. 5 * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that 6 * contains the configurati...
顺序:(1)定义结构体变量。(2)使能时钟。(3)配置初始化电平。(4)通过结构体变量初始化GPIO。 1.首先定义一个结构体变量GPIO_InitStruct,该变量类型是GPIO_InitTypeDef。 GPIO_InitTypeDef 定义如下: /** * @brief GPIO Init structure definition*/typedefstruct{ uint32_t Pin;/*!< Specifies the GPIO pins ...
* @brief Initializes the GPIOx peripheral according to the specified * parameters in the GPIO_InitStruct. * @param GPIOx: where x can be (A..G) to select the GPIO peripheral. * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that ...
1、首先定义GPIO的初始化类型结构体:GPIO_InitTypeDef GPIO_InitStructure;此结构体的定义是在stm32f10x_gpio.h文件中,其中包括3个成员。 /** * @brief GPIO Init structure definition */ typedef struct { uint16_t GPIO_Pin; /*!< Specifies the GPIO pins to be configured. ...
@brief GPIO Init structure definition / typedef struct { uint32_t Pin; /!< Specifies the GPIO pins to be configured. Thisparametercan beanyvalueof@refGPIO_pins_define*/ uint32_t Mode; /*!< Specifies the operating mode for the selected pins. ...
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};/** Initializes the RCC Oscillatorsaccording to the specifiedparameters * in the RCC_OscInitTypeDef structure. */RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; ...
Initializes the GPIO module. The pins defined in the application-providedGPIOXXX_configstructure are initialized accordingly. Precondition The GPIO_config structure must exist and be persistent before this function can be called. This function must also be called before any other GPIO driver APIs. ...
/* Initialize CSL library - This is REQUIRED !!! */ CSL_init(); /* PLL configuration structure used to set up PLL interface */ // 主频为300Mhz PLL_setFreq(1, 0xF, 0, 1, 3, 3, 0); CHIP_RSET(XBSR,0x0001); EMIF_config(&MyEmifConfig); ...