?? main.c
字號:
//===============================================================================================================
// The information contained herein is the exclusive property of
// Sunnnorth Technology Co. And shall not be distributed, reproduced,
// or disclosed in whole in part without prior written permission.
// (C) COPYRIGHT 2003 SUNNORTH TECHNOLOGY CO.
// ALL RIGHTS RESERVED
// The entire notice above must be reproduced on all authorized copies.
//==============================================================================================================
//==============================================================================================================
// 工程名稱:RS232_Interface.scs
// 功能描述: 實現雙CPU的Client功能,即接收數據和點亮LED燈
// IDE 環境:SUNPLUS u'nSPTM IDE 1.8.0
//
// 涉及的庫:NONE
//
// 組成文件:
// system.asm
// uart.asm
// main.c
//
// 完成日期: 2003-7-7
//============================================================================================================
//============================================================================================================
// 文件名稱:main.c
// 實現功能:循環讀串口,根據主機發送的命令點亮相應的LED燈。
// 日 期:2003/7/7
//============================================================================================================
extern unsigned int F_UART_Initial(void);
extern unsigned int F_UART_Read(void);
extern void F_LED_On(unsigned int);
main()
{
unsigned int uiUARTCommand=0;
F_System_Initial();
F_UART_Initial();
while(1)
{
uiUARTCommand = F_UART_Read();
switch(uiUARTCommand)
{
case 0x0000:
break;
case 0x0011:
F_LED_On(0xFFFE);
break;
case 0x0022:
F_LED_On(0xFFFD);
break;
case 0x0044:
F_LED_On(0xFFFB);
break;
default:
break;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -