我要评分
获取效率
正确性
完整性
易理解

StartModule

Function Usage

Starts the module.

Prototype

VmiErrCode StartModule(VmiDataType module, uint8_t* config, uint32_t size)

Parameter Description

Field Name

Input/Output

Field Type

Description

module

Input

VmiDataType

Module data type.

config

Input

uint8_t*

Configuration used for module startup.

size

Input

uint32_t

Length of the memory pointed to by config.

config varies with module and is inherited from VmiConfig. VmiConfigVideo correspond to the video module, VmiConfigAudio to the audio module, VmiConfigTouch to the touch module, VmiConfigMic to the microphone module, and VmiConfig to the sensor and GPS modules.

1
2
3
struct VmiConfig {
    uint32_t version;                           // Set this parameter to the current version number of each module. For details, see the VmiVersion structure.
} __attribute__((packed));

VmiConfig needs to transfer the module version number mentioned in Module Version (VmiVersion). The version number is specific to each module.

Return Value Description

Data type: enum VmiErrCode: int32_t

The value can be any of the following:

  • OK (0): The module is successfully started.
  • Other values: The module fails to be started, and an error code is returned.