コード例 #1
0
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;
}
コード例 #2
0
ファイル: retarget.c プロジェクト: ForrestBlue/cortexm0ds
int fgetc(FILE *f) {
  return (UartPutc(UartGetc()));
}