mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-22 17:12:55 +08:00
37 lines
1.4 KiB
C
37 lines
1.4 KiB
C
#include "beep.h"
|
||
|
||
/*********************************************************************************
|
||
************************<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> STM32F407<30><37><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD>******************************
|
||
**********************************************************************************
|
||
* <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>: beep.c *
|
||
* <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>beep<65><70>ʼ<EFBFBD><CABC> *
|
||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>2017.08.30 *
|
||
* <20><> <20><><EFBFBD><EFBFBD>V1.0 *
|
||
* <20><> <20>ߣ<EFBFBD>Clever *
|
||
* ˵ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӦIO<49>ڳ<EFBFBD>ʼ<EFBFBD><CABC> *
|
||
**********************************************************************************
|
||
*********************************************************************************/
|
||
|
||
|
||
//BEEP<45><50>ӦIO<49><4F>ʼ<EFBFBD><CABC>
|
||
void BEEP_Init(void)
|
||
{
|
||
GPIO_InitTypeDef GPIO_Initure;
|
||
__HAL_RCC_GPIOG_CLK_ENABLE(); //<2F><><EFBFBD><EFBFBD>GPIOEʱ<45><CAB1>
|
||
|
||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>GPIOG7
|
||
GPIO_Initure.Pin=GPIO_PIN_7;
|
||
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(GPIOG,&GPIO_Initure);
|
||
|
||
HAL_GPIO_WritePin(GPIOG,GPIO_PIN_7,GPIO_PIN_RESET); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>GPIOG7<47><37><EFBFBD><EFBFBD>,<2C>رշ<D8B1><D5B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|