init1.c

来自「Cypress公司Cy7c6xxxx芯片的USB键盘及USB鼠标的firmwar」· C语言 代码 · 共 40 行

C
40
字号
#pragma option f0 /* remove page breaks from listing file */
/* 
 * CYC Code Development System
 * Tutorial Example
 * INIT1.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.
 */
#include <dev\c63413.h>
#include <port.h>
                                                                                               /*_init_*/
int i=5;

void __STARTUP(void)
{
        PORT0 = 0;
        PORT1 = 0;
        PORT2 = 0;
        PORT3 = 0;
        GPIO_CONFIG = PORT3_OPEN | PORT2_OPEN | PORT1_RESISTIVE | PORT0_OPEN;
}

void main(void)
{
        while(1) /* loop forever */
                PORT1=0x55;
}
                                                                                              /*_init_*/

⌨️ 快捷键说明

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