All pastes #1657986 Raw Edit

PSoC Printf

public c v1 · immutable
#1657986 ·published 2009-11-05 05:59 UTC
rendered paste body
#include	<m8c.h>#include	<stdio.h>#include	<string.h>#include	"PSoCAPI.h"int putchar(char c){	char str[] = " ";	strncpy( str , &c , 1 );	LCD_1_PrString( str );	return c;}void pos(char x,char y){	LCD_1_Position(x,y);}void main(void){	FLASH char *str;	int count = 12345;	float f_data = 1234.5678;		str = "World"; 	LCD_1_Start();    	pos(0,0);    cprintf("Hello ");	cprintf(str);			pos(1,0);	cprintf("%d",count);		pos(1,8);	cprintf("%4.5f",f_data);		}