TA的每日心情 | 开心 2015-8-7 21:35 |
---|
签到天数: 340 天 连续签到: 1 天 [LV.8]以坛为家I
|
发表于 2012-11-23 15:44:10
|
显示全部楼层
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include <device.h>
void delay(uint16 num)
{
while(num--);
}
void puts(uint8 *s)
{
while(*s)
UART_PutChar(*s++); //输出字符串
// UART_PutChar('\r'); //回车,将当前位置移到本行开头,此处不需要使用
UART_PutChar('\n'); //换行符,将当前位置移到下一行开头
}
void main()
{
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
/* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
UART_Start();
LCD1602_Start();
for(;;)
{
/* Place your application code here. */
LCD1602_Position(0,0);
LCD1602_PrintString("Welcome to PSOC");
puts("Welcome to the PSOC communities");
delay(50000);
delay(50000);
delay(50000);
delay(50000);
LCD1602_Position(1,0);
LCD1602_PrintString("I Love You!");
puts("http:psoc.eefocus.com");
delay(50000);
delay(50000);
delay(50000);
delay(50000);
}
}
/* [] END OF FILE */
|
|