blink.c
来自「此文档为adi公司arm7tdmi内核的aduc70XX系列各模块的源代码」· C语言 代码 · 共 35 行
C
35 行
/*********************************************************************
Author : ADI - Apps www.analog.com/MicroConverter
Date : Sept. 2005
File : blink.c
Hardware : Applicable to ADuC702x rev H or I silicon
Currently targetting ADuC7026.
Description : Blinks LED continuously
*********************************************************************/
#include<aduc7026.h>
void delay(int);
int main(void) {
GP4DAT = 0x04000000; // P4.2 configured as an output. LED is turned on
while (1){
GP4DAT ^= 0x00040000; // Complement P4.2
delay(2000000);
}
}
void delay (int length)
{
while (length >=0)
length--;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?