GetCustomAttrByBlockId

API definition

APP_ERROR GetCustomAttrByBlockId(uint32_t blockId, uint8_t *&customAttr) const;

Function

Obtains the custom attribute of a specified block ID.

Input

uint32_t blockId: block ID to be obtained.

uint8_t *&customAttr: custom feature attribute on the device.

Output

N/A

Return value

APP_ERROR: return status. For details, see Return Code Reference.

Restrictions

The length of customAttr must be customAttrBlockSize × customAttrLen. Otherwise, an out-of-bounds read/write error may occur, causing program breakdown. customAttrBlockSize and customAttrLen are set in Init or InitWithExtraVal.