Files
SM-1000M/IAPV1.1/Driver/pwr_ctrl/pwr_ctrl.c
2026-04-23 10:50:18 +08:00

24 lines
776 B
C

#include "pwr_ctrl.h" //包含需要的头文件
#include "delay.h" //包含需要的头文件
#include "pbdata.h"
/*-------------------------------------------------*/
/*------------------------------------------------*/
void PWR_CTRL_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE); //使能PB端口时钟
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; //推挽输出
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; //推免
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; //上拉
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_400KHz; //IO口速度为400KHz
GPIO_Init(GPIOA, &GPIO_InitStructure);
PWR_CTRLTFWF_L;//关闭WIFI与TF卡电源
PWR_CTRL3V3_L;
}