Chapter 4: Software
Omnii HDK API Functions
Psion Teklogix Omnii HDK User Manual
55
4.7.4.20 Hdk7545_ReadEepromExtendedData
Syntax
DWORD Hdk7545_ReadEepromExtendedData( HANDLE hdk, DWORD offset, DWORD size,
BYTE *data );
Parameters
•
hdk – [in] an open HDK handle.
•
offset – [in] 0-based offset in bytes from the start of the extended data region.
•
size – [in] the number of bytes of data to read from the extended data region.
•
data – [out] pointer to a BYTE array to where the EEPROM data will be copied. The array
must not be null, and must be at least 'size' bytes in length.
Description
This function reads from the extended data area of an EEPROM. The extended data region starts
at the first byte past the end of the EEPROM header (see Chapter 8: “EEPROM Specifications”
for more information).
The size of the EEPROM may vary. Drivers should use the extended data region size reported in
the Hdk7545_Eeprom structure (m_ExtendedSize) to determine how much space is available for
extended data. See
for details on reading the EEPROM header.
The format and contents of the extended data region are device-specific.
Returns
•
ERROR_SUCCESS – if successful.
•
ERROR_INVALID_HANDLE – the specified handle is invalid.
•
ERROR_INVALID_PARAMETER – one of the parameters was null/invalid, or the caller
specified an invalid offset or size.
•
ERROR_INVALID_DATA - an exception was generated.
•
Other errors are possible.
Sample Code
DWORD ReadExtended()
{
Hdk7545_Connector expansionSlot = Hdk7545_Connector_Expansion1;
HANDLE hdkHandle = INVALID_HANDLE_VALUE;
DWORD result = Hdk7545_Open(&hdkHandle, expansionSlot);
if( result != ERROR_SUCCESS ) {
return ERROR_NOT_SUPPORTED;
}
Hdk7545_Eeprom eeprom = { 0 };
eeprom.m_Size = sizeof(eeprom);
eeprom.m_Version = HDK7545_EEPROM_VERSION;
result = Hdk7545_ReadEepromHeader(hdkHandle, &eeprom);
if( result != ERROR_SUCCESS ) {
Hdk7545_Close(&hdkHandle);
return result;
}
BYTE data[24] = { 0 } ;
DWORD dataSize = sizeof(data);
DWORD offset = 0;
Summary of Contents for OMNii HDK XT10
Page 4: ......
Page 10: ......
Page 12: ......
Page 18: ......
Page 20: ......
Page 24: ......
Page 26: ......
Page 32: ......
Page 72: ......
Page 90: ......
Page 92: ......
Page 116: ......
Page 124: ......
Page 126: ......
Page 130: ......
Page 132: ......
Page 154: ......
Page 168: ......
Page 170: ......
Page 182: ......
Page 184: ......
Page 188: ......