Jump to main content

# 3.1.4.12 ICM_SetRegionDescriptor Function

## C

    void ICM_SetRegionDescriptor (ICM_REGION_ID regionId, ICM_REGION_DESCRIPTOR * pRegionDescriptor);

## Summary

Configures the memory region descriptor.

## Description

Sets the configuration of the memory region descriptor identifies with regionId parameter.

## Precondition

None.

## Parameters

Parameters | Description
--- | ---
regionId | Identifies the memory region of ICM
pRegionDescriptor | Pointer to the descriptor data structure of the specified memory region

## Returns

None.

## Example

    ICM_REGION_DESCRIPTOR region0Descriptor;

    region0Descriptor.secondaryList = NULL;
    // Set the proper configuration
    region0Descriptor.config.bitfield.algo = (unsigned int)ICM_SHA_256;
    (...)
    region0Descriptor.startAddress = (uint32_t)appMessageSHA1Sec;
    region0Descriptor.transferSize = ICM_GetTransferSize(sizeof(appMessageSHA1Sec));
    ICM_SetRegionDescriptor (ICM_REGION_0, &region0Descriptor);

## Remarks

None.

Rev: E