• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ APP_DEBUG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: APP_DEBUG

idigi_callback_status_t iDigiFileSystem::app_process_file_stat(idigi_file_stat_request_t * const request_data,
                                                     idigi_file_stat_response_t * const response_data)
{
    idigi_file_stat_t *pstat = &response_data->statbuf;
    idigi_callback_status_t status = idigi_callback_continue;

    SdFile entry = DigiSD.open(request_data->path);

    if (!entry.isOpen())
    {
     	APP_DEBUG("stat cannot open: %s\n", request_data->path);
        goto done;   	
    }

    pstat->last_modified = 0;					// Last modified date unsupported:
    pstat->hash_alg = idigi_file_hash_none;	// File hash not supported
    pstat->file_size = (size_t) entry.fileSize();
    pstat->flags = 0;
    if (entry.isDir())
    	pstat->flags |= IDIGI_FILE_IS_DIR;
    else
    	pstat->flags |= IDIGI_FILE_IS_REG;

    entry.close();

done:
    return status;
}
开发者ID:jordanh,项目名称:idigi-arduino-connector,代码行数:28,代码来源:iDigiFileSystem.cpp


示例17: ReadSerialPort

static s32 ReadSerialPort(Enum_SerialPort port, /*[out]*/u8* pBuffer, /*[in]*/u32 bufLen)
{
    s32 rdLen = 0;
    s32 rdTotalLen = 0;
    int loopi = 0;
    if (NULL == pBuffer || 0 == bufLen)
    {
        return -1;
    }
    Ql_memset(pBuffer, 0x0, bufLen);
    while (1)
    {
        rdLen = Ql_UART_Read(port, pBuffer + rdTotalLen, bufLen - rdTotalLen);       
        if (rdLen <= 0)  // All data is read out, or Serial Port Error!
        {
            break;
        }
        rdTotalLen += rdLen;
        // Continue to read...
    }
    if (rdLen < 0) // Serial Port Error!
    {
        APP_DEBUG("Fail to read from port[%d]\r\n", port);
        return -99;
    }
    return rdTotalLen;
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:27,代码来源:example_download_epo.c


示例18: proc_main_task

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

        // Init serial port
    InitializeSerialPort();

    APP_DEBUG(MY_FILE_TAG);
    


    // START MESSAGE LOOP OF THIS TASK
    while (keepGoing)
    {
         Ql_OS_GetMessage(&msg);
        switch(msg.message)
        {
           
            case 0:
            {                
                break;
            }            
            default:
                break;
          
        }        
    }

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


示例19: proc_main_task

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

    // Register & open UART port
    ret = Ql_UART_Register(UART_PORT1, 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(UART_PORT1, 115200, FC_NONE);
    if (ret < QL_RET_OK)
    {
        Ql_Debug_Trace("Fail to open serial port[%d], ret=%d\r\n", m_myUartPort, ret);
    }

    APP_DEBUG("\r\n<-- OpenCPU: ADC Example -->\r\n") 
        
    // Start to program ADC
    ADC_Program();

    // Start message loop of this task
    while (TRUE)
    {
        Ql_OS_GetMessage(&msg);
        switch(msg.message)
        {
        case MSG_ID_USER_START:
            break;
        default:
            break;
        }
    }
}
开发者ID:tanxjian,项目名称:M26_opencpu1.6,代码行数:35,代码来源:example_adc.c


示例20: SendMtkBinCmd

bool SendMtkBinCmd(u8 *strCmd)
{
        int len = 0,ret = 0;
        unsigned char outBuffer[256];
    
	// At initial, the protocol setting of the communication UART is supposed to be PMTK protocol.
	// Since EPO data are transferred using MTK Binary Packet, you have to change the protocol setting to MTK Binary Protocol
	// before starting EPO Transfer Protocol. You can use PMTK command 253 to change the UART protocol setting.
	// Please refer to 7.1 for the details of PMTK command 253.

        Ql_memset(outBuffer,0,sizeof(outBuffer));                
        Ql_memcpy((void *)outBuffer, strCmd, Ql_strlen(strCmd));
        len = Ql_strlen(outBuffer);
        outBuffer[len++] = 0x0D;
        outBuffer[len++] = 0x0A;
        outBuffer[len] = '\0';   
   
	/*send the data of outBuffer to the GPS module example L70 ect. */
        ret = Ql_UART_Write(m_gnssUartPort,outBuffer,len);
        if (ret < len)
        {
            APP_DEBUG("SendMtkBinCmd Only part of bytes are written, %d/%d \r\n", ret, len);
            return FALSE;
        }
        
        return TRUE;	

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ APP_ERROR_CHECK函数代码示例发布时间:2022-05-30
下一篇:
C++ APPL_TRACE_ERROR函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap