CH552/projects/examples/GPIO/Main.C

39 lines
1.2 KiB
C++
Raw Normal View History

2018-10-17 10:44:45 +02:00
/********************************** (C) COPYRIGHT *******************************
* File Name : Main.C
* Author : WCH
* Version : V1.0
* Date : 2017/01/20
* Description : GPIO <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ú<EFBFBD>GPIO<EFBFBD>ж<EFBFBD>ʹ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>
*******************************************************************************/
#include "..\Public\CH554.H"
#include "..\Public\Debug.H"
#include "GPIO.H"
#include "stdio.h"
#include <string.h>
#pragma NOAREGS
void main( )
{
UINT16 j = 0;
CfgFsys( ); //CH554ʱ<34><CAB1>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mDelaymS(20);
mInitSTDIO( ); //<2F><><EFBFBD><EFBFBD>0<EFBFBD><30>ʼ<EFBFBD><CABC>
printf("start ...\n");
#if GPIO_INTERRUPT
GPIOInterruptCfg(); //GPIO<49>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>ú<EFBFBD><C3BA><EFBFBD>
EA = 1;
printf("Run");
while(1){
printf(".");
mDelaymS(50);
}
#endif
Port1Cfg(3,4); //P14<31><34><EFBFBD>ó<EFBFBD><C3B3><EFBFBD>51˫<31><CBAB>ģʽ
while(1){
SCS = ~SCS;
mDelaymS(50);
}
}