SENA Rhio232 User Manual

Page 69

Advertising
background image

69

(0x30:Normal operation, 0x39:Abnormal operation, 0x31:Not the Set Mode)

※ When reaction event is received, get data using RHIO_GetSettingData function and

check the Level on setting.

eg. : RHIO_SndCmd_GetADC();

RHIO_SndCmd_SetPortEnable

Description : Used to send the command to enable/disable all the ports.

Function Prototype :

extern "C" __declspec(dllexport) bool RHIO_SndCmd_SetPortEnable

(SRHIOSetting sSetData);

Parameter :

SRHIOSetting sSetData : Data to set

SRHIOSetting.sADC.eModeADC[4] -> Value of the Level/Switch Mode

(EAM_LEVEL, EAM_SWITCH)

SRHIOSetting.sADC.bReference -> Value of the ADC Reference

(0x30:Avcc, 0x31:Internal, 0x32:External)

SRHIOSetting.sInput.isEnable[12] -> Input Enable/Disable

(Enable:true, Disable:false)

SRHIOSetting.sOutput.isEnable[10] -> Outnput Enable/Disable

(Enable:true, Disable:false)

Return : TRUE if successful, False if failed.

Parameter when reaction event is received :

WPARAM

: Command transfer status flag (ESF_SET_ENABLE)

LPARAM

: Control status flag of the command (False if Time Out Error)

(0x30:Normal operation, 0x39:Abnormal operation, 0x31:Not the Set Mode)

eg :

SRHIOSetting sSetData;

for(int index = 0; index < 4; index++)

SetData.sADC.eModeADC[index] = EAM_SWITCH;

sSetData.sADC.bReference = 0x30;

for(int index = 0; index < 12; index++)

SetData.sInput.isEnable[index] = true;

for(int index = 0; index < 10; index++)

sSetData.sOutput.isEnable[index] = true;

RHIO_SndCmd_SetPortEnable(sSetData);

Advertising