Be_getbezeleepromparameter, Syntax, Remarks – Rockwell Automation 6182 SDK User Manual
Page 47

RAC6182-Specific Extensions to the CE API
4–7
Publication 6182-UM002B-EN-P
The bezel EEPROM provides a total of 256 bytes of non-volatile storage.
The first 128 bytes (at offsets 0x00 through 0x7f) are reserved for use by
the CE operating system and built-in device drivers (specifically, those
drivers that handle devices attached to the bezel, namely the keypad,
touch screen and display). The remaining 128 bytes (at offsets 0x80
through 0xff) are reserved for future use.
The functions described in this section can be called by applications to
read the system area of the EEPROM (for example, in order to get the
keypad identifier, at offset 0x30).
be_GetBezelEEPROMParameter
This function gets EEPROM access mode and CRC status. It is
prototyped in bezeleeprom.h.
Syntax
#include
#include
DWORD be_GetBezelEEPROMParameter(DWORD dwParameter, DWORD
*pdwData)
Remarks
Mode or status information is written to *pdwData, depending on the
value of dwParameter. dwParameter may be evaluated with one of the
following macros:
Macro
Description
BEZEL_EEPROM_
PARAMETER_USE_
CRC
Get the current CRC mode. The value of *pdwData
will be 0 if CRC mode is disabled, or 1 if CRC mode
is enabled.
When CRC mode is enabled, the the16-bit check
value stored at offset 0x00 is protected and only the
EEPROM contents beginning at offset 0x02 may be
read or written. The CRC value at 0x00 is updated
when new data are written. Read and write
functions return CRC error codes in case of CRC
errors. The RAC6182 always boots with CRC mode
enabled.
When CRC mode is disabled the entire bezel
EEPROM is accessible for reading or writing. The
first write of new data will invalidate the CRC value
at 0x00. However, functions will not return CRC
error codes unless CRC mode is again enabled.
Thereafter, reads and writes will return CRC error
codes until the CRC value is recalculated.
BEZEL_EEPROM_
PARAMETER_CRC_
VALID
Get the current state of the CRC check value. The
value of *pdwData will be 0 if the 16-bit CRC value
stored at offset 0x00 of the EEPROM is invalid, and
to 1 if it is valid. This is the case whether CRC
mode is enabled or disabled.
Functions to Read from
and Write to the Bezel
EEPROM