/*
 * Copyright (c) 2018 Renesas Electronics Corporation. All rights reserved.
 */

#include <stdint.h>
#include <scif.h>


/************************************************************************/
/*NAME		: PutStr						*/
/************************************************************************/
void PutStr(const char *str,char rtn)
{
	while(*str){
		PutChar(*str);
		str++;
	}
	if(rtn == 1){
		PutChar(CR_CODE);
		PutChar(LF_CODE);
	}
}

void PutChar(char outChar)
{
	while(!(0x60 & *((volatile uint16_t*)SCIF0_SCFSR) ));
	*((volatile uint8_t*)SCIF0_SCFTDR) = outChar;
	*((volatile uint16_t*)SCIF0_SCFSR) &= ~0x60;	/* TEND,TDFE clear */
}
