📄 main.c
字号:
/******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
* File Name : main.c
* Author : MCD Application Team
* Date First Issued : 04/06/2003
* Description : Short Example, Program using the GPIO 0 port.
* the purpose of this program is to configure all the
* GPIO 0 pins port as Push-Pull output, then toggle the
* pins state each 300 ms.
********************************************************************************
* History:
* 04/06/2003 : Created
*******************************************************************************/
#include "71x_lib.h"
u32 i;
int main()
{
#ifdef DEBUG
debug();
#endif /* DEBUG */
// Configure GPIO0.0 pin to Push Pull Output
GPIO_Config (GPIO0,0x1,GPIO_OUT_PP);
// Set all GPIO0 pins low
(*GPIO0).PD=0x0000;
while(1)
{
for(i=0;i<0xFFFF;i++); //delay
GPIO_BitWrite(GPIO0,0,~GPIO_BitRead(GPIO0,0)); // Toggle GPIO0.0 pin
}
}
/******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -