PSoC Printf
public c v1 · immutable#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); }