打印
[DemoCode下载]

串**互,半主机模式

[复制链接]
309|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
天灵灵地灵灵|  楼主 | 2019-11-30 18:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
TE, se, AC, os
/****************************************************************************
* [url=home.php?mod=space&uid=288409]@file[/url]     main.c
* [url=home.php?mod=space&uid=895143]@version[/url]  V3.00
* $Revision: 2 $
* $Date: 14/01/28 11:44a $
* [url=home.php?mod=space&uid=247401]@brief[/url]    M051 Series Semihost Sample Code
*
* @note
* Copyright (C) 2014 Nuvoton Technology Corp. All rights reserved.
*
******************************************************************************/

#include <stdio.h>
#include "M051Series.h"


/*---------------------------------------------------------------------------------------------------------*/
/* Main Function                                                                                            */
/*---------------------------------------------------------------------------------------------------------*/

int32_t main()
{
    int8_t item;

    /*
        To enable semihost, user must define "DEBUG_ENABLE_SEMIHOST" constant when build code with M051Series BSP.
        This sample code is used to show how to print message/getchar on IDE debug environment.
        It will echo all input character back on UART #1 of KEIL IDE.

        In KEIL MDK, user need to open "View->Serial Window->UART #1" windows in debug mode.
        In IAR Workbench, user need to open "View->Terminal I/O" in debug mode.

        NOTE1: HardFault_Handler handler is implemented in retarget.c when semihost enabled.
        NOTE2: Semihost only works with Nuvoton NuLink ICE Dongle.
    */

    printf("\n Start SEMIHOST test: \n");

    while(1)
    {
        /* Get input character */
        item = getchar();

        /* Print input character back */
        printf("%c\n", item);
    }
}

/*** (C) COPYRIGHT 2014 Nuvoton Technology Corp. ***/





使用特权

评论回复
沙发
天灵灵地灵灵|  楼主 | 2019-11-30 18:06 | 只看该作者
哈哈,这名字厉害了。马赛克,串口,交互。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

161

主题

3317

帖子

13

粉丝