Power Management features

SerialPort provides power management for PCMCIA and CF cards.* This allows your application to use significantly less power when appropriate. This in turn maximizes battery life and user satisfaction.

Using the power management features is very simple.

Here is a code snip of how you can get the state of a particular card slot.

int slot = choiceSlot.getSelectedIndex();
int pMode = SerialPortLocal.getPowerMode(slot);

Setting the card state to standby or active, is equally simple.

int pMode = 1;
if (cbStandby.getState()) pMode = 0;
int slot = choiceSlot.getSelectedIndex();
SerialPortLocal.setPowerMode(slot, pMode);

*Not supported on all platforms