beautypg.com

Remarks, Return value, Portability – Rockwell Automation 6182 SDK User Manual

Page 49

background image

RAC6182-Specific Extensions to the CE API

4–9

Publication 6182-UM002B-EN-P

Remarks
Sets access mode or recalculates CRC, depending on dwParameter and
the value of *pdwData. dwParameter may be evaluated using one of the
following macros:

Macro

Description

BEZEL_EEPROM_
PARAMETER_USE_
CRC

Set CRC mode. If the value of *pdwData is 1, CRC
mode is enabled. If the value of *pdwData is 0, CRC
mode is disabled.

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

Recalculate the CRC value. If the value of
*pdwData is 1, the 16-bit CRC value stored at offset
0x00 of the EEPROM is recalculated. This is the
case whether CRC mode is enabled or disabled. If
the value of *pdwData is 0, there is no action.

Return Value
The possible return values are represented by the following macros,
defined in bezeleeprom.h:

Macro

Description

BEZEL_EEPROM_OK

EEPROM present, arguments valid, function
completed successfully.

BEZEL_EEPROM_
DEVICE_NOT_
PRESENT

No EEPROM detected – either bezel not present or
EEPROM on it not functioning.

BEZEL_EEPROM_
INVALID_
PARAMETER

Bad parameter passed to function, for example a
NULL pointer or an address out of range.

BEZEL_EEPROM_
INVALID_CRC

CRC mode is enabled and the CRC on the
EEPROM is currently invalid.

Portability
This function is specific to the RAC6182 hardware.

This manual is related to the following products: