SAMA5D3 Xplained: A few fixes for the AJoystick driver (still not working)
This commit is contained in:
parent
1da7d86cc5
commit
cfe59305b6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user