/****************************************************************************
[ fputc.c ] -  ITM implementations
****************************************************************************/

/*
 *  for MB9BF618T on FRK-FM3
 * 
 *   Copyright (C) by Y.Ishioka.
 */

#include <stdio.h>
#include <tk/tkernel.h>
#if 0 /* Y.Ishioka */
#include "MK60N512MD100.h"
#include "core_cm4.h"
#else
#include "mb9bf618t.h"
#include "core_cm3.h"
#endif

struct __FILE { int handle; };
FILE __stdout;
FILE __stdin;

/**
 * @brief       output the character that was designated
 *
 * @param       output character
 * @param       output handler(not used)
 * @return      the character that was designated
 * @attention   This function was called by printf() in order to putting characters.
 *
 * int fputc(int ch, FILE *f)
 */
int fputc(int ch, FILE *f)
    {
    ITM_SendChar(ch);
    return (ch);
    }
