View Issue Details

IDProjectCategoryView StatusLast Update
0003806FSiMX6DIOpublic2019-02-04 15:28
Reporterzutter Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionV2.50 
Target VersionV2.70Fixed in VersionV2.70 
Summary0003806: Wait for interrupt returns immediately (seems refer to IOPin7 on NetDCUA9 only)
DescriptionWait for interrupt returns immediately (seems refer to IOPin7 on NetDCUA9 only)
Steps To ReproduceSet registry, rebbot and call:

int _tmain(int argc, _TCHAR* argv[])
{
    HANDLE hDIO = CreateFile( _T("DIO1:"), GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
    
    WAITIRQ cWaitIrq[2];
    cWaitIrq[0].dwIOPin = 7;
    cWaitIrq[0].dwTimeout = 10000;
    cWaitIrq[1].dwIOPin = 6;
    cWaitIrq[1].dwTimeout = 20000;

    /* Request a sysintr */
    
    BOOL b = DeviceIoControl(hDIO,IOCTL_DIO_REQUEST_IRQ, &cWaitIrq[0].dwIOPin, sizeof(DWORD), NULL, 0, NULL, NULL);
    
    b=DeviceIoControl(hDIO,IOCTL_DIO_INTDONE_IRQ, &cWaitIrq[0].dwIOPin, sizeof(DWORD), NULL, 0, NULL, NULL );
    b=DeviceIoControl(hDIO,IOCTL_DIO_INTDONE_IRQ, &cWaitIrq[1].dwIOPin, sizeof(DWORD), NULL, 0, NULL, NULL );

    /* Wait for a sysintr */
    while(true)
    {
        DWORD dwWaitRes = -1; /* Return value that
        * indicates the event result.
        * WAIT_OBJECT_0,
        * WAIT_ABANDONED,
        * WAIT_TIMEOUT */
        b=DeviceIoControl(hDIO,IOCTL_DIO_WAIT_IRQ, &cWaitIrq[0], sizeof(WAITIRQ), &dwWaitRes, sizeof(DWORD), NULL, NULL );

        /* Call InterruptDone on a sysintr */
        b=DeviceIoControl(hDIO,IOCTL_DIO_INTDONE_IRQ, &cWaitIrq[0].dwIOPin, sizeof(DWORD), NULL, 0, NULL, NULL );

    }

    DeviceIoControl(hDIO,IOCTL_DIO_RELEASE_IRQ, &cWaitIrq[0].dwIOPin, sizeof(DWORD), NULL, 0, NULL, NULL );
 
    
    CloseHandle(hDIO);
    return 0;
}
Forum Link
Found Driver Version
Fixed Driver Version

Activities

There are no notes attached to this issue.