当前位置: 首页>>代码示例>>C++>>正文


C++ APP_DEBUG函数代码示例

本文整理汇总了C++中APP_DEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ APP_DEBUG函数的具体用法?C++ APP_DEBUG怎么用?C++ APP_DEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了APP_DEBUG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Timer_handler

// timer callback function
void Timer_handler(u32 timerId, void* param)
{
    *((s32*)param) +=1;
    if(Stack_timer == timerId)
    {
        APP_DEBUG("<-- stack Timer_handler, param:%d -->\r\n", *((s32*)param));
        // stack_timer repeat
        if(*((s32*)param) >= TIMEOUT_COUNT)
        {
            s32 ret;
            ret = Ql_Timer_Stop(Stack_timer);
            if(ret < 0)
            {
                APP_DEBUG("\r\n<--failed!! stack timer Ql_Timer_Stop ret=%d-->\r\n",ret);
            }
            APP_DEBUG("\r\n<--stack timer Ql_Timer_Stop(ID=%d,) ret=%d-->\r\n",Stack_timer,ret);
        }
    }
    if(GP_timer == timerId)
    {
        APP_DEBUG("<-- GP-Timer_handler, param:%d -->\r\n", *((s32*)param));
        //not repeat
    }

}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:26,代码来源:example_timer.c

示例2: idigi_run_thread

static void * idigi_run_thread(void * arg)
{
    idigi_status_t status = idigi_success;

    APP_DEBUG("idigi_run thread starts\n");

    while (status == idigi_success)
    {
        status = idigi_run((idigi_handle_t)arg);

        if (status == idigi_receive_error ||
            status == idigi_send_error ||
            status == idigi_connect_error)
        {
            /* server may disconnect us, so
             * let's try to reconnect.
             */
            status = idigi_success;
        }
        /* if status is not idigi_success, calling idigi_run
         * again will cause to re-connect to idigi.
         */
    }
    APP_DEBUG("idigi_run thread exits %d\n", status);

    pthread_exit(arg);
}
开发者ID:GUBotDev,项目名称:idigi-arduino-connector,代码行数:27,代码来源:main.c

示例3: proc_main_task

void proc_main_task(s32 taskId)
{
    ST_MSG msg;
    s32 ret;

    // Register & open UART port
    ret = Ql_UART_Register(UART_PORT1, CallBack_UART_Hdlr, NULL);
    Ql_UART_Register(UART_PORT2, CallBack_UART_Hdlr, NULL);
    Ql_UART_Register(UART_PORT3, CallBack_UART_Hdlr, NULL);
    ret = Ql_UART_Open(UART_PORT1, 115200, FC_NONE);
    Ql_UART_Open(UART_PORT2, 115200, FC_NONE);
    Ql_UART_Open(UART_PORT3, 115200, FC_NONE);
    APP_DEBUG("<--OpenCPU: system.-->\r\n");

    while(TRUE)
    {
        Ql_OS_GetMessage(&msg);
        switch(msg.message)
        {
#ifdef __OCPU_RIL_SUPPORT__
        case MSG_ID_RIL_READY:
            APP_DEBUG("<-- RIL is ready -->\r\n");
            Ql_RIL_Initialize();
            break;
#endif
        default:
            break;
        }
    }
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:30,代码来源:example_system.c

示例4: CallBack_UART_Hdlr

static void CallBack_UART_Hdlr(Enum_SerialPort port, Enum_UARTEventType msg, bool level, void* customizedPara)
{
    switch (msg)
    {
    case EVENT_UART_READY_TO_READ:
    {

        s32 totalBytes = ReadSerialPort(port, m_RxBuf_Uart, sizeof(m_RxBuf_Uart));
        if (totalBytes > 0)
        {
            proc_handle(m_RxBuf_Uart,sizeof(m_RxBuf_Uart));
        }
        break;
    }
    case EVENT_UART_DTR_IND:// DTR level changed, developer can wake up the module in here
    {
        if(0 == level)
        {
            APP_DEBUG("DTR set to low =%d  wake !!\r\n", level);
            Ql_SleepDisable();
        }
        else
        {
            APP_DEBUG("DTR set to high =%d  Sleep \r\n", level);
            Ql_SleepEnable();
        }

    }
    case EVENT_UART_READY_TO_WRITE:
        break;
    default:
        break;
    }
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:34,代码来源:example_system.c

示例5: InitializeSerialPort

static void InitializeSerialPort(void)
{
    s32 ret;

     // Register & open UART port
    // UART port
    ret = Ql_UART_Register(m_myUartPort, CallBack_UART_Hdlr, NULL);
    if (ret < QL_RET_OK)
    {
        Ql_Debug_Trace("Fail to register serial port[%d], ret=%d\r\n", m_myUartPort, ret);
    }
    ret = Ql_UART_Open(m_myUartPort, 115200, FC_NONE);
    if (ret < QL_RET_OK)
    {
        Ql_Debug_Trace("Fail to open serial port[%d], ret=%d\r\n", m_myUartPort, ret);
    }
     Ql_UART_Write(m_myUartPort, "\r\nRDY\r\n", Ql_strlen("\r\nRDY\r\n")); 

    // Register & open virtual serial port
    ret = Ql_UART_Register(m_myVirtualPort, CallBack_UART_Hdlr, NULL);
    if (ret < QL_RET_OK)
    {
        APP_DEBUG("Fail to register serial port[%d], ret=%d\r\n", m_myVirtualPort, ret);
    }
    ret = Ql_UART_Open(m_myVirtualPort, 115200, FC_NONE);
    if (ret < QL_RET_OK)
    {
        APP_DEBUG("Fail to open serial port[%d], ret=%d\r\n", m_myVirtualPort, ret);
    }

}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:31,代码来源:example_csd.c

示例6: CSD_Disconnect

void CSD_Disconnect(void)
{
    // -------- Received END command, exit from CSD data mode -------
    APP_DEBUG("<-- Exit from CSD data mode -->\r\n");
    Ql_UART_SendEscap(m_myVirtualPort);

    // -------- Close CSD connection -------
    APP_DEBUG("<-- Close CSD connection -->\r\n");
    Ql_UART_Write(m_myVirtualPort, "ATH\n", 4);
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:10,代码来源:example_csd.c

示例7: CallBack_GPRS_Deactived

void CallBack_GPRS_Deactived(u8 contextId, s32 errCode, void* customParam )
{
    if (errCode == SOC_SUCCESS)
    {
        APP_DEBUG("<--CallBack: deactived GPRS successfully.-->\r\n"); 
        m_tcp_state = STATE_NW_GET_SIMSTATE;
    }else
    {
        APP_DEBUG("<--CallBack: deactived GPRS failure,(contexid=%d,error_cause=%d)-->\r\n",contextId,errCode); 
    }
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:11,代码来源:example_tcpclient.c

示例8: UserData_BackUp_callback

void UserData_BackUp_callback(s8 result, u8* pUserData, s32 len)
{
    if(result)// 1 means backup successfully
    {
        APP_DEBUG("<--callback:Sysparam backUp successfully !!!-->\r\n");
    }
    else  // -1 means backup failed.
    {
        APP_DEBUG("<--callback:User Data backUP failed!!!-->\r\n");
    }
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:11,代码来源:example_system.c

示例9: Callback_GPRS_Actived

void Callback_GPRS_Actived(u8 contexId, s32 errCode, void* customParam)
{
    if(errCode == SOC_SUCCESS)
    {
        APP_DEBUG("<--CallBack: active GPRS successfully.-->\r\n");
        m_tcp_state = STATE_GPRS_GET_DNSADDRESS;
    }else
    {
        APP_DEBUG("<--CallBack: active GPRS successfully,errCode=%d-->\r\n",errCode);
        m_tcp_state = STATE_GPRS_ACTIVATE;
    }      
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:12,代码来源:example_tcpclient.c

示例10: application_run_thread

static void * application_run_thread(void * arg)
{
    int status;

    APP_DEBUG("idigi_run thread starts\n");

    status = application_run((idigi_handle_t)arg);

    APP_DEBUG("application_run thread exits %d\n", status);

    pthread_exit(arg);
}
开发者ID:GUBotDev,项目名称:idigi-arduino-connector,代码行数:12,代码来源:main.c

示例11: Telephony_CallOut

static void Telephony_CallOut(void)
{
    s32 ret;
    s32 callState;
    char callOutPhoneNum[] = "15056083774\0";
    ret = RIL_Telephony_Dial(0, callOutPhoneNum, &callState);
    if (RIL_AT_SUCCESS == ret && CALL_STATE_OK == callState)
    {
        APP_DEBUG("<-- Dial \"%s\" successfully -->\r\n", callOutPhoneNum);
    } else {
        APP_DEBUG("<-- Fail to dial \"%s\", cause: %d -->\r\n", ret);
    }
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:13,代码来源:example_call.c

示例12: UserData_Read_callback

void UserData_Read_callback(s8 result, u8* pUserData, s32 len)
{
    ST_UARTDCB* pBackupData = (ST_UARTDCB* )pUserData;

    if(result)// 1 means backup successfully
    {

        APP_DEBUG("<--callback: Sysparam(len=%d) Read out successfully! BaudRate=%d,DataBit=%d,FlowCtrl=%d,Parity=%d,StopBit=%d-->\r\n", \
                  len,pBackupData->baudrate,pBackupData->dataBits,pBackupData->flowCtrl,pBackupData->parity,pBackupData->stopBits);
    }
    else  // -1 means backup failed.
    {
        APP_DEBUG("<--callback: User Data Read out failed!!!-->\r\n");
    }
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:15,代码来源:example_system.c

示例13: CSD_Establish

void CSD_Establish(char* csdNumber)
{
    char strCsdDialAT[30];
    s32 len = Ql_sprintf(strCsdDialAT, "ATD%s\r\n", csdNumber);
    APP_DEBUG("<-- Dialing CSD number: %s -->\r\n", csdNumber);
    Ql_UART_Write(m_myVirtualPort, strCsdDialAT, len);
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:7,代码来源:example_csd.c

示例14: proc_main_task

void proc_main_task()
{
    s32 ret;
    ST_MSG msg;
    bool keepGoing = TRUE;
    
 

    // Register & open UART port
    Ql_UART_Register(UART_PORT1, CallBack_UART_Hdlr, NULL);
    Ql_UART_Open(UART_PORT1, 115200, FC_NONE);

    Ql_UART_Register(UART_PORT2, CallBack_UART_Hdlr, NULL);
    Ql_UART_Open(UART_PORT2, 115200, FC_NONE);

    APP_DEBUG("\r\n<--OpenCPU: IIC TEST!-->\r\n"); 

    while (keepGoing)
    {
         Ql_OS_GetMessage(&msg);
        switch(msg.message)
        {
        case 0:
            break;
        default:
            break;
        }
        
    }

}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:31,代码来源:example_iic.c

示例15: app_server_reboot

static int app_server_reboot(void)
{

    APP_DEBUG("Reboot from server\n");
    /* should not return from rebooting the system */
    return 0;
}
开发者ID:GUBotDev,项目名称:idigi-arduino-connector,代码行数:7,代码来源:network.c


注:本文中的APP_DEBUG函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。