输出模式 
 
  LL_GPIO_InitTypeDef GPIO_InitStruct = {0}; 
 
  //GPIO Ports Clock Enable 
  LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOC); 
   
  LL_GPIO_ResetOutputPin(GPIOC, LL_GPIO_PIN_3); 
  GPIO_InitStruct.Pin = LL_GPIO_PIN_3; 
  GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT; 
  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW; 
  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL; 
  LL_GPIO_Init(GPIOC, &GPIO_InitStruct); 
 
 
设置与清除操作 
 
  LL_GPIO_SetOutputPin(GPIOC , LL_GPIO_PIN_3);//设置 
  LL_GPIO_ResetOutputPin(GPIOC,LL_GPIO_PIN_3);//清除 
  LL_GPIO_TogglePin(GPIOC,LL_GPIO_PIN_3);//反转 
 
 
 
输入模式 
 
  LL_GPIO_InitTypeDef GPIO_InitStruct = {0}; 
   
  GPIO_InitStruct.Pin = LL_GPIO_PIN_12; 
  GPIO_InitStruct.Mode = LL_GPIO_MODE_INPUT; 
  GPIO_InitStruct.Pull=LL_GPIO_PULL_UP;//上拉电阻打开 
  LL_GPIO_Init(GPIOD, &GPIO_InitStruct); 
 
 
读取引脚状态 
 
 if(LL_GPIO_IsInputPinSet(GPIOD,LL_GPIO_PIN_12)) 
   ;//.... 
 
 
                   
                    	 
                     | 
				 
			  
             |