Beispiel #1
0
static void T2TCmdRsp_2(void* pCallbackParameter, unsigned long nDataLength, unsigned long nResult)
{
    unsigned char *pRspBuffer = (unsigned char *)pCallbackParameter;
    int doNext = 0;

    LOGD("%s: nDataLength(%ld), nResult(0x%lX)", __FUNCTION__, nDataLength, nResult);
    DtaPrintBuf("pRspBuffer:", pRspBuffer, nDataLength);

    if(sizeof(DTA_T2T_CMD_2_RSP) == 0)
    {
        goto end;
    }

    if(DtaGetErrorCode(nResult) != DTA_SUCCESS)
    {
        goto end;
    }

    //compare OK
    if(memcmp(pRspBuffer, DTA_T2T_CMD_2_RSP, sizeof(DTA_T2T_CMD_2_RSP)) == 0)
    {
        doNext = DtaRfCmd(DTA_T2T_CMD_3_REQ,
                          sizeof(DTA_T2T_CMD_3_REQ),
                          T2TCmdRsp_3);
        goto end;
    }

end:

    if(0 == doNext)
        DtaFlowTestEnd();
}
Beispiel #2
0
static void static_DetectionHandler(unsigned long type, unsigned long nError)
{
    LOGD("%s:", __FUNCTION__);

    switch(type)
    {
    case 0x0001:
        T1TPlatformTest();
        break;
    case 0x0002:
        T2TPlatformTest();
        break;
    case 0x0003:
        T3TPlatformTest();
        break;
    case 0x0004:
        T4TPlatformTest();
        break;
    case 0x0005:
        P2PTest(DTA_P2P_INITIATOR);
        break;
    case 0x0006:
        P2PTest(DTA_P2P_TARGET);
        break;
    default:
        DtaFlowTestEnd();
        break;
    }

}
Beispiel #3
0
static void T2TCmdRsp_4(void* pCallbackParameter, unsigned long nDataLength, unsigned long nResult)
{
    unsigned char *pRspBuffer = (unsigned char *)pCallbackParameter;

    LOGD("%s: nDataLength(%ld), nResult(0x%lX)", __FUNCTION__, nDataLength, nResult);
    DtaPrintBuf("pRspBuffer:", pRspBuffer, nDataLength);
    DtaGetErrorCode(nResult);

    DtaFlowTestEnd();
}
Beispiel #4
0
int T2TPlatformTest(void)
{
    int send_len;

    transferMessageToJava((char*)"T2TPlatformTest");
    LOGD("%s:", __FUNCTION__);

    send_len = DtaRfCmd(DTA_T2T_CMD_0_REQ,
                        sizeof(DTA_T2T_CMD_0_REQ),
                        T2TCmdRsp_0);

    if(0 == send_len)
        DtaFlowTestEnd();

    return send_len;
}