1.4.3.12 MMHI_SendCommandFrame Function

C

void MMHI_SendCommandFrame (
        uint8_t cmdCode, 
        uint8_t* data, 
        uint8_t length
    );

Summary

MMHI Send a command frame through serial port.

Description

Function that allow to implement a command frame for custom commands that are out of MMHI specification.

Parameters

ParamDescription
cmdCodeCommand code to be sent
dataPointer to the object containing the command frame data
lengthLength of the command frame data

Returns

None.

Example

    #define APP_MMHI_CMD_CUSTOM1  0x70;

    uint8_t cmdCode = APP_MMHI_CMD_CUSTOM1;
    uint8_t cmdData[5];

    cmdData[0] = DAT0;
    cmdData[1] = DAT1;
    cmdData[2] = DAT2;
    cmdData[3] = DAT3;
    cmdData[4] = DAT4;
    
    MMHI_SendCommandFrame(cmdCode, &cmdData, sizeof(cmdData));

Remarks

None.