Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
959 B

#include <irda.h>
#include <irioctl.h>
#include <irlap.h>
#include <irlmp.h>
VOID
IrdaEventCallback(struct CTEEvent *Event, PVOID Arg)
{
PIRDA_LINK_CB pIrdaLinkCb = (PIRDA_LINK_CB) Arg;
PIRDA_EVENT pIrdaEvent = (PIRDA_EVENT) Event;
if (pIrdaLinkCb)
REFADD(&pIrdaLinkCb->RefCnt, 'TNVE');
pIrdaEvent->Callback(pIrdaLinkCb);
PAGED_CODE();
if (pIrdaLinkCb)
REFDEL(&pIrdaLinkCb->RefCnt, 'TNVE');
}
VOID
IrdaEventInitialize(PIRDA_EVENT pIrdaEvent,
VOID (*Callback)(PVOID Context))
{
CTEInitEvent(&pIrdaEvent->CteEvent, IrdaEventCallback);
pIrdaEvent->Callback = Callback;
}
VOID
IrdaEventSchedule(PIRDA_EVENT pIrdaEvent, PVOID Arg)
{
PIRDA_LINK_CB pIrdaLinkCb = (PIRDA_LINK_CB) Arg;
if (CTEScheduleEvent(&pIrdaEvent->CteEvent, pIrdaLinkCb) == FALSE)
{
DEBUGMSG(1, (TEXT("CTEScheduleEvent failed\n")));
ASSERT(0);
}
}