I need an implementation of kbhit() for the nios terminal in eclipse. I found the following example
#include <termios.h>
int kbhit(void)
{
struct termios term, oterm;
int fd = 0;
int c = 0;
tcgetattr(fd, &oterm);
memcpy(&term, &oterm, sizeof(term));
}
i tried but i got an error, so i insertet the function "tcgetattr" directly
#include <termios.h>
#include <sys/ioctl.h>
int
tcgetattr(int fd,struct termios *termios_p)
{
return ioctl(fd,TCGETS,termios_p);
}
-> Now i have the problem, that he can't find "TCGETS" !! it seems to be defined nowhere ?????


Reply With Quote

Bookmarks