size_t __read(int handle, unsigned char * buffer, size_t size) { /* Remove the #if #endif pair to enable the implementation */ int nChars = 0; for (/* Empty */; size > 0; --size) { int c = UartGetc(); if (c < 0) break; *buffer++ = c; ++nChars; } return nChars; }
int fgetc(FILE *f) { return (UartPutc(UartGetc())); }