Skip to content

Instantly share code, notes, and snippets.

@dagon666
Created December 31, 2013 10:10
Show Gist options
  • Save dagon666/8194890 to your computer and use it in GitHub Desktop.
Save dagon666/8194890 to your computer and use it in GitHub Desktop.
linux tty io for CLI
unsigned char linux_getc(unsigned char *a_data) {
*a_data = getchar();
return 1;
}
unsigned char linux_putc(unsigned char *data, unsigned char a_len) {
while (a_len--) {
fputc(*data++, stdout);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment