📄 init3.c
字号:
#pragma option f0 /* remove page breaks from listing file */
/*
* CYC Code Development System
* Tutorial Example
* INIT3.C
* This code may be adapted for any purpose
* when used with the CYC Code Development
* System. No warranty is implied or given
* as to their usability for any purpose.
*
* (c) Copyright 2000 Byte Craft Limited
* 421 King St.N., Waterloo, ON, Canada, N2J 4E4
* VOICE: 1 (519) 888 6911
* FAX : 1 (519) 746 6751
* email: support@bytecraft.com
*
* REVISION HISTORY
* v1.00 AL 01/2000 Initial Version.
*/
#define __SHOW_LIBRARY /* include library sources in listing file */
#include <dev\c63413.h>
#include <port.h>
/*_init_*/
#include <startup.h>
/* set PORT0 configuration to CMOS output
set PORT1 configuration to open drain
set PORT2 configuration to open drain
set PORT2 configuration to resistive */
#define GPIO_CONFIG_STARTUP PORT0_CMOS | PORT1_OPEN | PORT2_OPEN | PORT3_RESISTIVE
#define PORT0_STARTUP 0x00
#define PORT1_STARTUP 0x55
#define PORT2_STARTUP 0xAA
#define PORT3_STARTUP 0x00
void main(void)
{
while(1) /* loop forever */
{
PORT0 = PORT3;
}
}
/*_init_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -