Jim, thanks! That should do fine (and no need for me to fiddle deep in the
hardware). Any reason this call ISN'T documented? Seems to be a very useful
feature for those of us developing hardware add-ons to be able to check the
status of the GP2 pin.
Now of course you have no obligation to answer and I know it might change
in the future, but do you know what the difference is between the
hwrDockStatusModemAttached and the hwrDockStatusDockAttached flags? Do they
both refer to pin GP2 or two different signals? I know that on a Palm V the
voltage level driven on GP2 (called "I2" on the V) indicates what type of
device is connected: charger or modem. But what is a generic "dock"? Is it
set when anything other than nothing is detected? Hmm.
Regards,
Kris
At 03:11 PM 6/7/00, you wrote:
>The following information is officially unsupported. But I'd rather see
>you use a stable, unsupported API call than go poking at the hardware
>directly. Both solutions will affect your app's Platinum Certification if
>you plan to go about requesting it, but the unsupported API call allows
>you to request a special exception and is more likely to be granted. So,
>with that said...
>
>Call UInt16 HwrDockStatus(void) and check for the
>hwrDockStatusModemAttached bit in the result. Note that not all hardware
>is capable of uniquely setting each bit of the result, therefore in some
>cases a "best fit" answer is computed.
>
>// Bits returned by HwrDockStatus()
>#define hwrDockStatusUndocked 0x0000 // nothing is attached
>#define hwrDockStatusModemAttached 0x0001 // some type of modem is
>attached
>#define hwrDockStatusDockAttached 0x0002 // some type of dock is
>attached
>#define hwrDockStatusUsingExternalPower 0x0004 // using some type of
>external power source
>#define hwrDockStatusCharging 0x0008 // internal power cells
>are recharging
>
>Regards,
>
>Jim Schram
>Palm Incorporated
>Partner Engineering
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/