⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 ucLinux ported to STR71.
💻 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  the
*                      GPIO 0 pins port, then toggle the  pins state .
********************************************************************************
* History:
*  04/06/2003 : Created
*******************************************************************************/
#include "71x_map.h"

void delay(void)
{
  u16 i;
  for(i=0; i<0xFFFF; i++);
}

int main(void)
{ u16 a;
  
  GPIO0->PC0 |= 0x000F;
  GPIO0->PC1 &= 0xFFF0;
  GPIO0->PC2 |= 0x000F;

  
  GPIO0->PD |= 0x000F;
  
  


 while(1) // infinite loop
  { 
    delay();
    a= 0x000F;    
    GPIO0->PD = GPIO0->PD ^ a; // Toggle GPIO 0 pins
   
  }
}

/******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -