Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 6 - Power Manager / Power Manager Reference
Power Manager Dispatch Routines / Controlling the Internal Modem


GetIntModemInfo

You can use the GetIntModemInfo function to find out information about the internal modem.

unsigned long GetIntModemInfo();
DESCRIPTION
The GetIntModemInfo function returns a 32-bit field containing information that describes the features and state of the internal modem. It can be called whether or not a modem is installed and will return the correct information.

If a bit is set, that feature or state is supported or selected; if the bit is cleared, that feature is not supported or selected. Undefined bits are reserved by Apple for future expansion.
Bit nameBit
number
Description
hasInternalModem0An internal modem is installed.
intModemRingDetect1The modem has detected a ring on the telephone line.
intModemOffHook2The internal modem has taken the telephone line off hook (that is, you can hear the dial tone or modem carrier).
intModemRingWakeEnb3The computer will come out of sleep mode if the modem detects a ring on the telephone line and the computer supports this feature (see the canWakeupOnRing bit in PMFeatures).
extModemSelected4The external modem is selected (if this bit is set, then the modem port will be connected to port A of the SCC; if the modem port is not shared by the internal modem and the SCC, then this bit can be ignored).

Bits 15-31 contain the modem type, which can have one of the following values:
ValueMeaning
-1Modem is installed but type not recognized.
0No modem is installed.
1Modem is a serial modem.
2Modem is a PowerBook Duo-style Express Modem.
3Modem is a PowerBook 160/180-style Express Modem.

ASSEMBLY-LANGUAGE INFORMATION
The trap is _PowerMgrDispatch ($A09E). The selector value for GetIntModemInfo is 14 ($0E) in the low word of register D0. The bit field to set is passed in the high word of register D0.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996