The use of the optional GetSync and SetSync routines has been expanded to manage the settings of all synchronization-related parameters of a frame buffer controller, not just the horizontal and vertical syncs. GetSync and SetSync can be used to implement the VESA DPMS as well as enable a sync-on-green mode for the frame buffer.
A VDSyncInfoRec data structure has been defined for the GetSync and SetSync routines:
struct VDSyncInfoRec {
unsigned char csMode;
unsigned char csFlags;
}
The csMode parameter specifies the state of the sync lines according to these bit definitions:
enum {
kDisableHorizontalSyncBit = 0,
kDisableVerticalSyncBit = 1,
kDisableCompositeSyncBit = 2,
kEnableSyncOnBlue = 3,
kEnableSyncOnGreen = 4,
kEnableSyncOnRed = 5
};
To implement the DPMS standard, bits 0 and 1 of the csMode field should have the following values:
0 | 0 | Active |
0 | 1 | Standby |
1 | 0 | Idle |
1 | 1 | Off |
GetSync can be used in two ways: to get the current status of the hardware and to get the capabilities of the frame buffer controller. These two different kinds of information are discussed in the next sections.