stm32_标准库_2

RCC(外设)

c 复制代码
void RCC_AHBPeriphClockCmd(uint32_t RCC_AHBPeriph, FunctionalState NewState);
void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState);
void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState);

RCC是复位和时钟控制,这个可以对系统时钟进行配置,还有就是能使歌模块的时钟。在stm32中其他的这些外设在上电的情况下是没有时钟的,不给时钟的情况下操作外设是无效的,外设也不会工作,这样的目的是降低功耗。所以在操作外设之前必须要使它的时钟这就是我们需要用RCC完成时钟的使能

GPIO(外设)

c 复制代码
void GPIO_DeInit(GPIO_TypeDef* GPIOx);//GPIO外设复位函数
void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct);//用结构体参数初始化GPIO口
void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct);//结构体变量复制默认值

/*读写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);
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);

开漏输出模式(Out_OD)高电频没有驱动能力,低电平有驱动能力

推挽(out_pp) 高低电平均有输出能力,推挽输出,直接输出高低电平直接驱动小功率耗电器

相关推荐
嵌联驰1 小时前
【S32K3 RTD MCAL 篇1】 K344 KEY 控制 EMIOS PWM
单片机
Daemon.Chen1 小时前
【STM32开发之寄存器版】(五)-窗口看门狗WWDG
stm32·单片机·嵌入式硬件
嵌入式杂谈3 小时前
STM32中断编程详解:配置外部中断和中断服务例程
stm32·单片机·嵌入式硬件
光子物联单片机4 小时前
传感器模块编程实践(三)舵机+超声波模块融合DIY智能垃圾桶模型
stm32·单片机·嵌入式硬件·mcu
嵌入式杂谈6 小时前
STM32中断编程指南:NVIC和中断优先级
stm32·单片机·嵌入式硬件
xiaobuding_QAQ7 小时前
自用Proteus(8.15)常用元器件图示和功能介绍(持续更新...)
单片机·嵌入式硬件·学习·proteus
zxfly20139 小时前
STM32的DMA技术介绍
stm32·单片机·嵌入式硬件
CV金科14 小时前
蓝桥杯—STM32G431RBT6(IIC通信--EEPROM(AT24C02)存储器进行通信)
stm32·单片机·嵌入式硬件·算法·蓝桥杯
嵌入式详谈16 小时前
基于STM32的智能风扇控制系统设计
stm32·单片机·嵌入式硬件
小小怪大梦想16 小时前
RTC实时时钟
stm32·单片机·嵌入式硬件