ECU Measurement and Calibration Toolkit C API Reference

Table of Contents

mcCCPMoveMemory

  • Updated2023-02-21
  • 2 minute(s) read

Purpose

Moves a memory block on the ECU (CCP only).

Format

mcTypeStatus mcCCPMoveMemory(
mcTypeTaskRef ECURefNum,
mcAddress Source,
mcAddress Destination,
u32 BlockSize);

Input

ECURefNum

ECURefNum is the task reference which links to the selected ECU. This reference is originally returned from mcECUSelectEx.

Source

Configures the source address for the memory move operation in the ECU. mcAddress is a C struct consisting of:

Address

Specifies the address part of the source address.

Extension

Extension contains the extension part of the source address.

Destination

Configures the destination address for the memory move operation in the ECU. mcAddress is a C struct consisting of:

Address

Specifies the address part of the destination address.

Extension

Extension contains the extension part of the destination address.

BlockSize

BlockSize determines the size of memory block in bytes which should be moved from the source address to the destination address.

Output

Return Value

The return value indicates the status of the function call as a signed 32-bit integer. Zero means the function executed successfully. A negative value specifies an error, which means the function did not perform the expected behavior. A positive value specifies a warning, which means the function performed as expected, but a condition arose that may require attention.

Use the mcStatusToString function of the ECU M&C API to obtain a descriptive string for the return value.

Description

mcCCPMoveMemory is used to move the memory contents of an ECU from one memory location to another. Before calling the CCP MOVE command this function sets the Memory Transfer Address pointers MTA0 as defined in the source struct and MTA1 as defined in the destination struct to appropriate values.

mcCCPMoveMemory implements the CCP command MOVE defined by the CCP specification.

Log in to get a better experience