Chapter 4: Software
Omnii HDK API Functions
56
Psion Teklogix Omnii HDK User Manual
4.7.4.21 Hdk7545_WriteEepromExtendedData
Syntax
DWORD Hdk7545_WriteEepromExtendedData( HANDLE hdk, DWORD offset, DWORD size,
const 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 write to the extended data region.
•
data – [in] pointer to a BYTE array containing the EEPROM data to write. The array must not
be null, and must be at least 'size' bytes in length.
Description
This function writes to 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.
if( eeprom.m_ExtendedSize < dataSize ) {
Hdk7545_Close(&hdkHandle);
return ERROR_INVALID_DATA;
}
result = Hdk7545_ReadEepromExtendedData(hdkHandle, offset,
dataSize, data);
if( result != ERROR_SUCCESS ) {
// handle error here...
Hdk7545_Close(&hdkHandle);
return result;
}
Hdk7545_Close(&hdkHandle);
return ERROR_SUCCESS;
}
Содержание OMNii HDK XT10
Страница 4: ......
Страница 10: ......
Страница 12: ......
Страница 18: ......
Страница 20: ......
Страница 24: ......
Страница 26: ......
Страница 32: ......
Страница 72: ......
Страница 90: ......
Страница 92: ......
Страница 116: ......
Страница 124: ......
Страница 126: ......
Страница 130: ......
Страница 132: ......
Страница 154: ......
Страница 168: ......
Страница 170: ......
Страница 182: ......
Страница 184: ......
Страница 188: ......