SAMA5D3 Xplained: A few fixes for the AJoystick driver (still not working)

This commit is contained in:
Gregory Nutt 2014-12-03 14:33:00 -06:00
parent 1da7d86cc5
commit cfe59305b6

View File

@ -114,8 +114,8 @@ static b16_t g_ybslope;
static const char *g_ajoynames[AJOY_NBUTTONS] =
{
"SELECT", "FIRE", "JUMP", "BUTTON 3",
"BUTTON 4", "BUTTON 5", "BUTTON 6", "BUTTON 7",
"SELECT", "FIRE", "JUMP", "BUTTON 4",
"BUTTON 5", "BUTTON 6", "BUTTON 7", "BUTTON 8",
};
/****************************************************************************
@ -205,14 +205,14 @@ static int ajoy_wait(int fd, FAR const struct timespec *timeout)
(void)sigemptyset(&sigset);
(void)sigaddset(&sigset, CONFIG_EXAMPLES_AJOYSTICK_SIGNO);
ret = sigwaitinfo(&sigset, &value);
ret = sigtimedwait(&sigset, &value, timeout);
if (ret < 0)
{
int errcode = errno;
if (!timeout || errcode != EAGAIN)
{
fprintf(stderr, "ERROR: sigwaitinfo() failed: %d\n", errcode);
fprintf(stderr, "ERROR: sigtimedwait() failed: %d\n", errcode);
return -errcode;
}