1.Led灯闪烁最长用的三个函数RCC AHB外设时钟控制RCC APB2外设时钟控制RCC APB1外设时钟控制GPIO库函数1.void GPIO_DeInit(GPIO_TypeDef* GPIOx); //复位GPIO外设2.void GPIO_AFIODeInit(void);//复位AFIO外设3.void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct);//用结构体的参数初始化GPIO口⭐⭐⭐⭐⭐4.void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct);//把结构体变量赋一个默认值5.GPIO的读取函数⭐⭐⭐uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx);uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx);6.GPIO的写入函数⭐⭐⭐void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);//把指定的端口设置为高电平void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);//把指定的端口设置为低电平void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal);//根据第三个参数的值设置指定端口void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal);//可以同时对十六个端口进行写入参数推挽输出的模式高低电平都有驱动能力开漏输出的模式高电平没有驱动能力高电平相当于高阻态低电平有驱动能力2.Led流水灯3.蜂鸣器最后介绍几种使用库函数的方法1.先打开.h文件的最后看一下都有哪些函数然后再右键转到定义查看一下函数和参数的用法。2.资料文件夹里的库函数用户手册手册是老版本的可能会有些出入。3.百度一下参考别人的。修仙一途道阻且长共勉