29 #define EL_NXT_PORT_A 0 30 #define EL_NXT_PORT_B 1 31 #define EL_NXT_PORT_C 2 32 #define EL_NXT_PORT_S1 3 33 #define EL_NXT_PORT_S2 4 34 #define EL_NXT_PORT_S3 5 35 #define EL_NXT_PORT_S4 6 36 #define EL_NXT_PORT_BATTERY 7 37 #define EL_NXT_PORT_SPEAKER 8 38 #define EL_NXT_PORT_BLUETOOTH 9 39 #define EL_NXT_PORT_NO_USE 65535 42 #define EL_NXT_PHYSICAL_PORT_A (EL_NXT_PHYSICAL_ID_MOTOR | 0x00) 43 #define EL_NXT_PHYSICAL_PORT_B (EL_NXT_PHYSICAL_ID_MOTOR | 0x01) 44 #define EL_NXT_PHYSICAL_PORT_C (EL_NXT_PHYSICAL_ID_MOTOR | 0x02) 45 #define EL_NXT_PHYSICAL_PORT_S1 (EL_NXT_PHYSICAL_ID_SENSOR | 0x00) 46 #define EL_NXT_PHYSICAL_PORT_S2 (EL_NXT_PHYSICAL_ID_SENSOR | 0x01) 47 #define EL_NXT_PHYSICAL_PORT_S3 (EL_NXT_PHYSICAL_ID_SENSOR | 0x02) 48 #define EL_NXT_PHYSICAL_PORT_S4 (EL_NXT_PHYSICAL_ID_SENSOR | 0x03) 49 #define EL_NXT_PHYSICAL_PORT_BATTERY (EL_NXT_PHYSICAL_ID_BATTERY | 0x00) 50 #define EL_NXT_PHYSICAL_PORT_SPEAKER (EL_NXT_PHYSICAL_ID_SPEAKER | 0x00) 51 #define EL_NXT_PHYSICAL_PORT_BLUETOOTH (EL_NXT_PHYSICAL_ID_BLUETOOTH | 0x00) 53 #define EL_BT_NO_INIT 4 54 #define EL_BT_INITIALIZED 5 55 #define EL_BT_CONNECTED 6 56 #define EL_BT_STREAM 7 63 ELInt32 (*
pFncGetAngle)(ELUInt32 portid, ELUInt32 sw, ELFloat64 *pAngle);
64 ELInt32 (*
pFncSetAngle)(ELUInt32 portid, ELFloat64 angle, ELFloat64 speed);
66 ELInt32 (*
pFncGetSpeed)(ELUInt32 portid, ELInt32 idx, ELFloat64 *pOutSpeed);
96 ELInt32 (*
pFncOutput)(ELUInt32 portid, ELUInt32 freq, ELUInt32 mx, ELUInt32 vol);
105 ELInt32 (*
pFncSendData)(ELUInt32 portid,
const ELUInt8 *buf, ELUInt32 offset, ELUInt32 len, ELUInt32 *outsize);
106 ELInt32 (*
pFncReceiveData)(ELUInt32 portid, ELUInt8 *buf, ELUInt32 offset, ELUInt32 len, ELUInt32 *outsize);
ELInt32(* pFncSpeakerInit)(ELUInt32 portid)
ELInt32(* pFncSetBrake)(ELUInt32 portid, ELBool *pFlagBrake)
ELInt32(* pFncGetBrake)(ELUInt32 portid, ELBool *pFlagBrake)
ELInt32(* pFncSonarTerminate)(ELUInt32 portid)
ELInt32(* pFncSetSpeed)(ELUInt32 portid, ELFloat64 speed)
ELInt32(* pFncGetAngle)(ELUInt32 portid, ELUInt32 sw, ELFloat64 *pAngle)
ELInt32(* pFncReceiveData)(ELUInt32 portid, ELUInt8 *buf, ELUInt32 offset, ELUInt32 len, ELUInt32 *outsize)
ELInt32(* pFncSendData)(ELUInt32 portid, const ELUInt8 *buf, ELUInt32 offset, ELUInt32 len, ELUInt32 *outsize)
ELInt32(* pFncSetAngle)(ELUInt32 portid, ELFloat64 angle, ELFloat64 speed)
ELInt32(* pFncGetDeviceName)(ELUInt32 portid, ELChar *pName)
ELInt32(* pFncGyroSetOffset)(ELUInt32 portid, ELUInt16 offset)
ELInt32(* pFncSetDeviceName)(ELUInt32 portid, const ELChar *pName)
ELInt32(* pFncMotorInit)(ELUInt32 portid)
ELInt32(* pFncSonarGetValue)(ELUInt32 portid, ELInt32 *pValue)
ELInt32(* pFncTouchGetState)(ELUInt32 portid, ELBool *pStatus)
ELInt32(* pFncSonarInitialize)(ELUInt32 portid)
ELInt32(* pFncLightGetValue)(ELUInt32 portid, ELUInt16 *pValue)
ELInt32(* pFncLightSetLED)(ELUInt32 portid, ELBool light)
ELInt32(* pFncInitializeMaster)(ELUInt32 portid, const ELUChar *addr, const ELChar *pPin)
ELInt32(* pFncResetEncoder)(ELUInt32 portid)
ELInt32(* pFncGetSpeed)(ELUInt32 portid, ELInt32 idx, ELFloat64 *pOutSpeed)
ELInt32(* pFncTerminate)(ELUInt32 portid)
ELInt32(* pFncGetVoltage)(ELUInt32 portid, ELUInt16 *pVoltage)
ELInt32(* pFncGetCtlMode)(ELUInt32 portid, ELInt32 *pMode)
ELInt32(* pFncBluetoothInit)(ELUInt32 portid)
ELInt32(* pFncGetStatus)(ELUInt32 portid, ELInt32 *pStatus)
ELInt32(* pFncInitializeSlave)(ELUInt32 portid, const ELChar *pPin)
ELInt32(* pFncLightGetLED)(ELUInt32 portid, ELBool *pStatus)
ELInt32(* pFncGyroGetValue)(ELUInt32 portid, ELUInt16 *pValue)
ELInt32(* pFncOutput)(ELUInt32 portid, ELUInt32 freq, ELUInt32 mx, ELUInt32 vol)
ELInt32(* pFncBatteryInit)(ELUInt32 portid)
ELInt32(* pFncGyroGetOffset)(ELUInt32 portid, ELUInt16 *pValue)
ELInt32(* pFncSensorInit)(ELUInt32 portid)
ELInt32(* pFncGetSignalStrength)(ELUInt32 portid, ELInt32 *pStrength)
ELInt32(* pFncSetCtlMode)(ELUInt32 portid, ELInt32 *pMode)