42 lines
1.8 KiB
C
Raw Normal View History

2021-10-01 00:21:50 +08:00
#include "led.h"
/*********************************************************************************
*********************<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> STM32F407Ӧ<EFBFBD>ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*************************
**********************************************************************************
* <EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: led.c *
* <EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>LED<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD> *
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>2017.08.30 *
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>V1.0 *
* <EFBFBD><EFBFBD> <EFBFBD>ߣ<EFBFBD>Clever *
* ˵ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>LED<EFBFBD><EFBFBD>ӦIO<EFBFBD>ڳ<EFBFBD>ʼ<EFBFBD><EFBFBD> *
* <EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̣<EFBFBD>https://shop125046348.taobao.com *
**********************************************************************************
*********************************************************************************/
//LED<45><44>ӦIO<49><4F>ʼ<EFBFBD><CABC>
void LED_Init(void)
{
GPIO_InitTypeDef GPIO_Initure;
__HAL_RCC_GPIOE_CLK_ENABLE(); //<2F><><EFBFBD><EFBFBD>GPIOEʱ<45><CAB1>
__HAL_RCC_GPIOG_CLK_ENABLE(); //<2F><><EFBFBD><EFBFBD>GPIOEʱ<45><CAB1>
GPIO_Initure.Pin=GPIO_PIN_3|GPIO_PIN_4; //PF9,10
GPIO_Initure.Mode=GPIO_MODE_OUTPUT_PP; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
GPIO_Initure.Pull=GPIO_PULLUP; //<2F><><EFBFBD><EFBFBD>
GPIO_Initure.Speed=GPIO_SPEED_HIGH; //<2F><><EFBFBD><EFBFBD>
HAL_GPIO_Init(GPIOE,&GPIO_Initure);
GPIO_Initure.Pin=GPIO_PIN_9; //
HAL_GPIO_Init(GPIOG,&GPIO_Initure);
HAL_GPIO_WritePin(GPIOE,GPIO_PIN_3,GPIO_PIN_SET); //PE3<45><33>1<EFBFBD><31>Ĭ<EFBFBD>ϳ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
HAL_GPIO_WritePin(GPIOE,GPIO_PIN_4,GPIO_PIN_SET); //PE4<45><34>1<EFBFBD><31>Ĭ<EFBFBD>ϳ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
HAL_GPIO_WritePin(GPIOG,GPIO_PIN_9,GPIO_PIN_SET); //PG9<47><39>1<EFBFBD><31>Ĭ<EFBFBD>ϳ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>*<2A><>*<2A><>*<2A><>
}