hwrmiscflags.pp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. {$MACRO ON}
  2. {$define Rsc := }
  3. (******************************************************************************
  4. *
  5. * Copyright (c) 1995-2000 Palm, Inc. or its subsidiaries.
  6. * All rights reserved.
  7. *
  8. * File: HwrMiscFlags.h
  9. *
  10. * Release: Palm OS SDK 4.0 (63220)
  11. *
  12. * Description:
  13. * Bit constants for the hardware MiscFlags
  14. *
  15. * History:
  16. * 10/26/99 JED Created by Jesse Donaldson, extracted from <HwrGlobals.h>
  17. *
  18. *****************************************************************************)
  19. {$IFNDEF FPC_DOTTEDUNITS}
  20. unit hwrmiscflags;
  21. {$ENDIF FPC_DOTTEDUNITS}
  22. interface
  23. (**************************************************************************
  24. * General Equates
  25. ***************************************************************************)
  26. // ----------------------------------------------------------------------
  27. // NOTE: In some ROMs between 3.0 and 3.3 (inclusive), OEMs may have
  28. // ROM tokens present in the ROM that were detected by the boot code
  29. // in order to set the various HwrMiscFlags and GHwrMiscFlagsExt
  30. // settings. That scheme is no longer relevant, since starting with
  31. // version 3.5 and later, it is now the responsibility of the HAL
  32. // to set these flags, using whatever means necessary to determine
  33. // what "features" the device has that the higher level OS may want
  34. // to know about.
  35. //
  36. // These flags are defined in this public header file since both
  37. // of these low memory globals are published as system features
  38. // (sysFtrNumHwrMiscFlags and sysFtrNumHwrMiscFlagsExt) in <SystemMgr.h>.
  39. // These features are for third party software that may (for whatever
  40. // reason) want to know about certain hardware differences without
  41. // having to read the low memory globals directly.
  42. //
  43. // Palm OS v3.1 was the first OS to publish sysFtrNumHwrMiscFlags as a feature.
  44. // Call FtrGet first; if the feature doesn't exist, check the OS version:
  45. // Palm OS v2.0 and 3.0 have GHwrMiscFlags defined as a low memory global.
  46. // Palm OS v1.0 did not have GHwrMiscFlags, so its contents are unpredictable.
  47. // Any devices running Palm OS v1.0 devices should assume zero for all flags.
  48. // ----------------------------------------------------------------------
  49. // Bits in the low memory global GHwrMiscFlags (UInt16)
  50. const
  51. hwrMiscFlagHasBacklight = $0001; // set if backlight is present
  52. hwrMiscFlagHasMbdIrDA = $0002; // set if IrDA is present (on main board)
  53. hwrMiscFlagHasCardIrDA = $0004; // set if IrDA is present (on memory card)
  54. hwrMiscFlagHasBurrBrown = $0008; // set if BurrBrown A/D is present
  55. hwrMiscFlagHasJerryHW = $0010; // set if Jerry Hardware is present
  56. hwrMiscFlagNoRTCBug = $0020; // set if using rev of DragonBall (3G or later)
  57. // that doesn't require the RealTimeClock
  58. // bug work-around (see TimeMgr68328.c).
  59. // <chg 3-27-98 RM>
  60. hwrMiscFlagHas3vRef = $0040; // set if switchable 3v reference is present
  61. hwrMiscFlagHasAntennaSw = $0080; // set if viewer has an antenna raised switch
  62. hwrMiscFlagHasCradleDetect = $0100; // set if we have an A/D converter on hotsync port used for ID'ing the attached device
  63. hwrMiscFlagHasSWContrast = $0200; // set if UI should support software contrast
  64. hwrMiscFlagInvertLCDForBL = $0400; // set if we need to invert LCD w/Backlight
  65. hwrMiscFlagHasMiscFlagExt = $0800; // set if we have new hwrMiscFlagsExt
  66. // The following bit flags are set by HwrIdentifyFeatures.
  67. // They allow software to read the hardware ID without poking at hardware.
  68. // They also provide some isolation from different ID detection schemes
  69. // such as if the ID detection mechanism should change with EZ...
  70. hwrMiscFlagID1 = $1000; // set if ID bit keyBitHard1 was set
  71. hwrMiscFlagID2 = $2000; // set if ID bit keyBitHard2 was set
  72. hwrMiscFlagID3 = $4000; // set if ID bit keyBitHard3 was set
  73. hwrMiscFlagID4 = $8000; // set if ID bit keyBitHard4 was set
  74. hwrMiscFlagIDMask = $F000;
  75. hwrMiscFlagIDOffset = 12; // Bits to shift to get a numeric ID
  76. // NOTE: Currently, the '328 IDs don't overlap with the 'EZ IDs. This is NOT a requirement,
  77. // but is convenient for the time being as it makes it one step easier to identify a device.
  78. // If the spaces are forced to overlap, it will be necessary to first check the processor
  79. // type (328 or EZ) and then parse the product ID code. Fortunately, this scheme is rapidly
  80. // becoming obsolete since it was based on reading the keyboard I/O pins, and new products
  81. // are starting to move their keyboard I/O bits to new places. With the introduction of
  82. // different HAL modules, identifying the actual hardware is now something the HAL code
  83. // will do when the device boots. The HAL need only do whatever it needs to do to uniquely
  84. // tell the difference between those devices on which it is capable of operating. Once
  85. // the hardware is identified, the appropriate hwrMiscFlag and hwrMiscFlagExt bits can be
  86. // set to tell the OS what features are present, and the appropriate hardware ID information
  87. // can also be set so higher level software can uniquely identify the OEM/Device/HAL info.
  88. //
  89. // Changes
  90. // 3/16/99 SCL: Documented '328 and 'EZ IDs and how the space could overlap if necessary
  91. // 3/31/99 SRJ: hwrMiscFlagIDUndetermined created, used specifically during the boot sequence
  92. // before we have done HwrIdentifyFeatures().
  93. // 10/29/99 SCL: Renamed hwrMiscFlagIDOther to hwrMiscFlagIDCheckROMToken
  94. // 10/29/99 SCL: Assigned hwrMiscFlagIDUnused1 to hwrMiscFlagIDUndetermined for Palm OS 3.5
  95. // 10/29/99 SCL: Assigned hwrMiscFlagIDUnused2 to hwrMiscFlagIDCheckOEMFtrs for Palm OS 3.5
  96. // 11/ 2/99 SCL: Assigned hwrMiscFlagIDUnused3 to hwrMiscFlagIDCobra2 for Palm OS 3.5
  97. // hwrMiscFlagIDCheckROMToken indicates that the actual device ID information
  98. // should be read from hwrROMTokenHardwareID using SysGetROMToken or HwrGetROMToken.
  99. // Attached to this token is the OEM ID and the OEM-specific Product ID.
  100. // This scheme was used in Palm OS releases prior to 3.5. See <HwrROMToken.h> for details.
  101. // This ID is also reported when booting on PalmPilot devices (aka 2.0 hardware).
  102. hwrMiscFlagIDCheckROMToken = 0; // used to be hwrMiscFlagIDOther
  103. hwrMiscFlagIDPalmPilot = 0; // since it was never explicitly set
  104. // hwrMiscFlagIDUndetermined is what the OS initializes the ID to when booting.
  105. // The HAL is responsible for setting the ID to something valid (and meaningful).
  106. hwrMiscFlagIDUndetermined = hwrMiscFlagID1; // used to be hwrMiscFlagIDUnused1
  107. // hwrMiscFlagIDCheckOEMFtrs indicates that the OEM/Device/HAL identification
  108. // information should be read from the new Palm OS 3.5 System Features
  109. // (sysFtrNumOEMCompanyID, sysFtrNumOEMDeviceID, and sysFtrNumOEMHALID)
  110. // or system globals (hwrOEMCompanyID, hwrOEMDeviceID, and hwrOEMHALID).
  111. // This method of hardware device ID is for HAL-based devices starting with Palm OS
  112. // 3.5, but some devices may continue to report valid old-style hwrMiscFlagIDxxx tags.
  113. hwrMiscFlagIDCheckOEMFtrs = hwrMiscFlagID2; // used to be hwrMiscFlagIDUnused2
  114. // Old-style Hardware IDs for DragonBall '328 based products
  115. hwrMiscFlagIDThumper = hwrMiscFlagID4 or hwrMiscFlagID2;
  116. hwrMiscFlagIDJerry = hwrMiscFlagID4 or hwrMiscFlagID3;
  117. hwrMiscFlagIDRocky = hwrMiscFlagID4 or hwrMiscFlagID3 or hwrMiscFlagID2;
  118. hwrMiscFlagIDTouchdown = hwrMiscFlagID4 or hwrMiscFlagID3 or hwrMiscFlagID2 or hwrMiscFlagID1;
  119. // Old-style Hardware IDs for DragonBall 'EZ based products
  120. hwrMiscFlagIDJerryEZ = hwrMiscFlagID3 or hwrMiscFlagID2;
  121. hwrMiscFlagIDSumo = hwrMiscFlagID4 or hwrMiscFlagID2 or hwrMiscFlagID1;
  122. hwrMiscFlagIDBrad = hwrMiscFlagID4 or hwrMiscFlagID3 or hwrMiscFlagID1;
  123. hwrMiscFlagIDAustin = hwrMiscFlagID4 or hwrMiscFlagID1;
  124. hwrMiscFlagIDCobra2 = hwrMiscFlagID2 or hwrMiscFlagID1;
  125. hwrMiscFlagIDCalvin = hwrMiscFlagID3 or hwrMiscFlagID1;
  126. // Hardware SubIDs used to detect hardware type early in boot process
  127. hwrMiscFlagExtSubIDBrad = $0;
  128. hwrMiscFlagExtSubIDSumo = $2;
  129. hwrMiscFlagExtSubIDCobra = $4;
  130. hwrMiscFlagExtSubIDCobra2_16 = $6;
  131. hwrMiscFlagExtSubIDCobra2_20 = $7;
  132. // Old-style Hardware IDs still unused
  133. hwrMiscFlagIDUnused4 = hwrMiscFlagID3;
  134. hwrMiscFlagIDUnused5 = hwrMiscFlagID3 or hwrMiscFlagID1;
  135. hwrMiscFlagIDUnused7 = hwrMiscFlagID3 or hwrMiscFlagID2 or hwrMiscFlagID1;
  136. hwrMiscFlagIDUnused8 = hwrMiscFlagID4;
  137. // Bits in the low memory global GHwrMiscFlagsExt (UInt32)
  138. hwrMiscFlagExtSubID1 = $00000001; // subtype ID (for feature select in device)
  139. hwrMiscFlagExtSubID2 = $00000002; // subtype ID (for feature select in device)
  140. hwrMiscFlagExtSubID3 = $00000004; // subtype ID (for feature select in device)
  141. hwrMiscFlagExtSubIDMask = $00000007; // sybtype ID Mask
  142. hwrMiscFlagExtHasLiIon = $00000010; // set if we have Lithium Ion battery rechargable in the cradle
  143. hwrMiscFlagExtHasRailIO = $00000020; // set if we have Rail I/O hardware
  144. hwrMiscFlagExtHasFlash = $00000040; // set (by OS or HAL) if we have Flash ROM
  145. hwrMiscFlagExtHasFParms = $00000080; // set (by OS or HAL) if we have Flash parms area
  146. hwrMiscFlagExt115KIrOK = $00000100; // device supports 115K IR transfers
  147. hwrMiscFlagExtHasExtLCD = $00000200; // device has syscall LCD controller
  148. hwrMiscFlagExtHasSWBright = $00000400; // device has software controlled brightness
  149. // Added by BGT, 08/01/2000
  150. hwrMiscFlagExtNeedsLpr = $00000800; // DRAM needs special LP Refresh
  151. // Assigned values for hwrOEMCompanyID (aka sysFtrNumOEMCompanyID):
  152. // Values are assigned by the Palm Computing Platform Engineering group.
  153. //
  154. // Note: These values are different from the values that may be found in some
  155. // OEM devices which used HwrROMTokens on versions of Palm OS prior to 3.5.
  156. hwrOEMCompanyIDUnspecified = $00000000; // hwrOEMCompanyID not specified by HAL
  157. hwrOEMHALIDUnspecified = $00000000; // hwrOEMHALID not specified by HAL
  158. hwrOEMDeviceIDUnspecified = $00000000; // hwrOEMDeviceID not specified by HAL
  159. hwrOEMCompanyIDPalmPlatform = Rsc('psys'); // Reference Platforms made by Palm Computing
  160. hwrOEMCompanyIDPalmDevices = Rsc('palm'); // Devices made by Palm Computing
  161. hwrOEMCompanyIDSymbol = Rsc('smbl'); // Devices made by Symbol Technologies
  162. hwrOEMCompanyIDQualcomm = Rsc('qcom'); // Devices made by Qualcomm
  163. hwrOEMCompanyIDTRG = Rsc('trgp'); // Devices made by TRG Products
  164. hwrOEMCompanyIDHandspring = Rsc('hspr'); // Devices made by Handspring
  165. // Hardware ID's for DragonBall EZ based products
  166. // hwrMiscFlagIDSumo = hwrMiscFlagID4 or hwrMiscFlagID2 or hwrMiscFlagID1;
  167. // hwrMiscFlagIDBrad = hwrMiscFlagID4 or hwrMiscFlagID3 or hwrMiscFlagID1;
  168. // Note that values for hwrOEMDeviceID (aka sysFtrNumOEMDeviceID) and
  169. // hwrOEMHALID (aka sysFtrNumOEMHALID) are OEM vendor-specific, and not
  170. // necessarily tracked by this Palm OS header file, though it may be
  171. // worthwhile to include "known" values here for third party developers.
  172. //
  173. // It is recommended that OEM vendors choose values for these globals that
  174. // are four-digit human-readable ASCII values, rather than numeric codes,
  175. // though this is not a requirement.
  176. // HALs that belong to hwrOEMCompanyIDPalmPlatform
  177. hwrOEMHALIDEZRef = Rsc('eref'); // (Mono) EZ Reference Platform (Palm Computing)
  178. hwrOEMHALIDEZRefColor = Rsc('cref'); // Color EZ Reference Platform (Palm Computing)
  179. // HALs that belong to hwrOEMCompanyIDPalmPlatform
  180. hwrOEMHALIDVZRef = Rsc('vref'); // (Mono) VZ Reference Platform (Palm Computing)
  181. hwrOEMHALIDVZRefColor = Rsc('cvrf'); // Color VZ Reference Platform (Palm Computing)
  182. // HALs that belong to hwrOEMCompanyIDPalmDevices
  183. hwrOEMHALID328Jerry = Rsc('jery'); // Palm VII HAL (Palm Computing)
  184. hwrOEMHALIDEZSumo = Rsc('sumo'); // Palm IIIx/V/Vx HAL (Palm Computing)
  185. hwrOEMHALID328Rocky = Rsc('rcky'); // Pilot, PalmPilot, Palm III HAL (Palm Computing)
  186. hwrOEMHALIDEZAustin = Rsc('astn'); // Palm IIIc (Palm Computing)
  187. hwrOEMHALIDEZCalvin = Rsc('cvln'); // Palm m100 (Palm Computing)
  188. implementation
  189. end.