Windows XP Community - XPHeads



COM_PowerUp & COM_PowerDown APIs

microsoft.public.windowsxp.device_driver.dev


Reply
  #1 (permalink)  
Old 12-20-2007, 12:45 PM
Ramesh.R
 
Posts: n/a
COM_PowerUp & COM_PowerDown APIs
Hi ,

I am developing the Power Management APIs in my SDIO-UART
serial driver for Windows Mobiles in WinCE 5.0 platform builder.

Here is my code for PowerDown case:


BOOL
COM_PowerDown(
HANDLE pHead /*@parm Handle to device. */
)
{
PHW_INDEP_INFO pHWIHead = (PHW_INDEP_INFO)pHead;

DbgPrint(" COM_PowerDown \r\n");

if ( pHWIHead ) {
PHWOBJ pHWObj = (PHWOBJ)pHWIHead->pHWObj;
return(pHWObj->pFuncTbl->HWPowerOff(pHWIHead->pHWHead));
} else {
return(1);
}

}

And the " HWPowerOff() " is mapped into " SerPowerOff()"

static
BOOL
SerPowerOff(
PVOID pHead // @parm PVOID returned by SerInit.
)
{
PSER_INFO pHWHead = (PSER_INFO)pHead;

DbgPrint(" + SerPowerOff \r\n");
// First, power down the UART
SL_PowerOff( pHWHead );

// And then disable our IR and 9 Pin interface
#ifdef WAKEUPONTHISDEVICE
if (pHWHead->LastDx != D3) // If we are wakeup sources do not
turn it off.
SerSetOutputMode( pHWHead, FALSE, FALSE );
#else
SerSetOutputMode( pHWHead, FALSE, FALSE );
#endif
DbgPrint(" - SerPowerOff \r\n");
return (TRUE);
}

Here I called the API " SL_PowerOff() "

in such case, i don't know what to write for this API...

VOID SL_PowerOff(PVOID pHead )
{
// --- Need to write
}


When we testing with these APIs( by putting debug messages), the
COM_PowerUp & COM_PowerDown APIs itself is not called by the OS/
Kernel. Am I need to register these APIs with any interface APIs?

If any one of you have ideas on power management APIs, please help on
this issue.

Here the problem is while sleep-mode and soft-reset , and the SDIO
card is also
inserted in SD-Slot condition, the driver is not getting loaded.

If you give any hint/document/link/code-snippet, I will be thankful.

I gone through the Microsoft Documentation.
It did not helped me.

Regards,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:48 AM.








Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74