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


C++ System_printf函数代码示例

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


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

示例1: taskFxn

/*
 *  ======== taskFxn ========
 */
Void taskFxn(UArg a0, UArg a1)
{
    System_printf("enter taskFxn()\n");
	
    Task_sleep(10);
	
    System_printf("exit taskFxn()\n");
}
开发者ID:DemonTu,项目名称:ALL_SmartBatterySwitch_CC2640,代码行数:11,代码来源:main.c

示例2: IpcResource_setConstraints

Int IpcResource_setConstraints(IpcResource_Handle handle,
                               IpcResource_ResHandle resHandle,
                               UInt32 action,
                               Void *constraints)
{
    Char msg[MAXMSGSIZE];
    IpcResource_Ack *ack = (Void *)msg;
    IpcResource_Req *req = (Void *)msg;
    UInt16 rlen = sizeof(IpcResource_ConstraintData);
    UInt16 alen = sizeof(*ack);
    UInt16 len;
    UInt32 remote;
    Int status;

    if (!handle) {
        System_printf("IpcResource_setConstraints: Invalid paramaters\n");
        return IpcResource_E_INVALARGS;
    }

    if (rlen && !constraints) {
        System_printf("IpcResource_setConstraints: needs parameters\n");
        return IpcResource_E_INVALARGS;
    }

    req->resType = 0;
    req->reqType = action;
    req->resHandle = resHandle;

    memcpy(req->resParams, constraints, rlen);
    status = MessageQCopy_send(MultiProc_getId("HOST"), IpcResource_server,
                        handle->endPoint, req, sizeof(*req) + rlen);
    if (status) {
        System_printf("IpcResource_setConstraints: MessageQCopy_send "
                      "failed status %d\n", status);
        status = IpcResource_E_FAIL;
        goto end;
    }

    if (action == IpcResource_REQ_TYPE_REL_CONSTRAINTS)
        goto end;

    status = MessageQCopy_recv(handle->msgq, ack, &len, &remote,
                               handle->timeout);
    if (status) {
        System_printf("IpcResource_setConstraints: MessageQCopy_recv "
                      "failed status %d\n", status);
        status = (status == MessageQCopy_E_TIMEOUT) ? IpcResource_E_TIMEOUT :
                 IpcResource_E_FAIL;
        goto end;
    }

    Assert_isTrue(len == (rlen + alen), NULL);

    status = _IpcResource_translateError(ack->status);

end:
    return status;
}
开发者ID:GAnthony,项目名称:sysbios-rpmsg,代码行数:58,代码来源:IpcResource.c

示例3: initNbExec

void initNbExec(int* nbExec, int nbDump){
    int i = 0;

    for(i=1; i<nbDump; i++){
        //*(nbExec+i) = 1;
        System_printf("%d;",i);
    }
    System_printf("\n");
}
开发者ID:rjmcneill,项目名称:CompletePreesmApps,代码行数:9,代码来源:dump.c

示例4: clk1Fxn

/*
 *  ======== clk1Fxn =======
 */
Void clk1Fxn(UArg arg0)
{
    UInt32 time;
    
    time = Clock_getTicks();
    System_printf("System time in clk1Fxn = %lu\n", (ULong)time);
    System_printf("Calling BIOS_exit() from clk1Fxn\n");
    BIOS_exit(0);
}       
开发者ID:andreimironenko,项目名称:bios,代码行数:12,代码来源:clock.c

示例5: testwolfcrypt

/*
 *  ======== testwolfcrypt ========
 *  Run the wolfcrypt test
 */
void testwolfcrypt(UArg arg0, UArg arg1)
{
    System_printf("Running wolfcrypt tests...\n");
    System_flush();
    wolfcrypt_test((void *)arg0);
    System_printf("Tests completed.\n");

    BIOS_exit(0);
}
开发者ID:Luke-91,项目名称:SoftwareSec_ass3,代码行数:13,代码来源:main.c

示例6: printMessages

void         	printMessages(int coreNum, unsigned char *ptr)
{
	int   i   ;
	System_printf("message arrived to core %d \n ",coreNum);
	for (i=0; i< NUMBER_PRINTS; i++)
	{
		System_printf("->  %x \n",*ptr++ );
	}
}
开发者ID:Deepaksen,项目名称:keystone-workshop,代码行数:9,代码来源:bioUtilityAndGlobals.c

示例7: IpcResource_connect

IpcResource_Handle IpcResource_connect(UInt timeout)
{
    UInt16 dstProc;
    UInt16 len;
    UInt32 remote;
    IpcResource_Handle handle;
    IpcResource_Req req;
    IpcResource_Ack ack;
    Int status;

    handle = Memory_alloc(NULL, sizeof(*handle), 0, NULL);
    if (!handle) {
        System_printf("IpcResource_connect: No memory");
        return NULL;
    }

    handle->timeout = (!timeout) ? DEFAULT_TIMEOUT :
                      (timeout == IpcResource_FOREVER) ? MessageQCopy_FOREVER :
                      timeout;

    dstProc = MultiProc_getId("HOST");

    handle->msgq= MessageQCopy_create(MessageQCopy_ASSIGN_ANY,
                                      &handle->endPoint);
    req.resType = 0;
    req.reqType = IpcResource_REQ_TYPE_CONN;
    req.resHandle = 0;
    status = MessageQCopy_send(dstProc, IpcResource_server,
                      handle->endPoint, &req, sizeof(req));
    if (status) {
        System_printf("IpcResource_connect: MessageQCopy_send "
                      " failed status %d\n", status);
        goto err;
    }

    status = MessageQCopy_recv(handle->msgq, &ack, &len, &remote,
                               handle->timeout);
    if (status) {
        System_printf("IpcResource_connect: MessageQCopy_recv "
                      "failed status %d\n", status);
        goto err;
    }
    status = _IpcResource_translateError(ack.status);
    if (status) {
        System_printf("IpcResource_connect: A9 Resource Manager "
                      "failed status %d\n", status);
        goto err;
    }

    return handle;
err:
    Memory_free(NULL, handle, sizeof(*handle));
    return NULL;
}
开发者ID:GAnthony,项目名称:sysbios-rpmsg,代码行数:54,代码来源:IpcResource.c

示例8: createService

static UInt32 createService(Char * name, UInt32 * endpt)
{
    Int i;
    Int status = 0;
    struct ServiceDef *sd;
    RcmServer_Handle  rcmSrvHandle;

    for (i = 0; i < ServiceMgr_NUMSERVICETYPES; i++) {
       if (!strcmp(name, serviceDefs[i].name)) {
           sd = &serviceDefs[i];
           break;
       }
    }

    if (i >= ServiceMgr_NUMSERVICETYPES) {
       System_printf("createService: unrecognized service name: %s\n", name);
       return OMX_NOTSUPP;
    }

    /* Create the RcmServer instance. */
#if 0
    System_printf("createService: Calling RcmServer_create with name = %s\n"
                  "priority = %d\n"
                  "osPriority = %d\n"
                  "rcmServerParams.fxns.length = %d\n",
                  sd->name, sd->rcmServerParams.priority,
                  sd->rcmServerParams.osPriority,
                  sd->rcmServerParams.fxns.length);
#endif
    status = RcmServer_create(sd->name, &sd->rcmServerParams, &rcmSrvHandle);

    if (status < 0) {
        System_printf("createService: RcmServer_create() returned error %d\n",
                       status);
        return OMX_FAIL;
    }

    /* Get endpoint allowing clients to send messages to this new server: */
    *endpt = RcmServer_getLocalAddress(rcmSrvHandle);

    /* Store Server's endpoint with handle so we can cleanup on disconnect: */
    if (!storeTuple(*endpt, (UInt32)rcmSrvHandle))  {
        System_printf("createService: Limit reached on max instances!\n");
        RcmServer_delete(&rcmSrvHandle);
        return OMX_FAIL;
    }

    /* start the server */
    RcmServer_start(rcmSrvHandle);

    System_printf("createService: new OMX Service at endpoint: %d\n", *endpt);

    return OMX_SUCCESS;
}
开发者ID:robclark,项目名称:sysbios-rpmsg,代码行数:54,代码来源:ServiceMgr.c

示例9: tools_ShowVersion

void tools_ShowVersion()
{
    System_printf("\n\n **** DSPMM VERSION INFO **** \n\nCompile DATE %s TIME %s \n", __DATE__, __TIME__);

    System_printf("\n** DSPMM VERSION INFO END ** \n");
#if 0
    System_printf("Trace Buffer PA 0x%x Trace Level %d\
                   \nTrace Usage: level:[0-4: 0-no trace, 1-err, 2-debug, 3-info, 4-CE,FC,IPC traces] \n\n",
                  MEMUTILS_getPhysicalAddr((Ptr)(TRACEBUFADDR)), dce_debug);
#endif
}
开发者ID:liyaoshi,项目名称:dspdce,代码行数:11,代码来源:main.c

示例10: tsk0_func

/*
 *  ======== tsk0_func ========
 *  Sends an event to the remote processor then pends on a semaphore.
 *  The semaphore is posted by the callback function.
 */
Void tsk0_func(UArg arg0, UArg arg1)
{
    Int i = 1;
    Int status;
    
    if (MultiProc_self() == 0) {
        while (i <= NUMLOOPS) {
            /* Send an event to the remote processor */
            status = Notify_sendEvent(dstProc, INTERRUPT_LINE, EVENTID, i, 
                    TRUE);

            /* Continue until remote side is up */
            if (status < 0) {
                continue;
            }

            System_printf("tsk1_func: Sent request #%d to %s\n", seq,
                MultiProc_getName(dstProc));

            /* Wait to be released by the cbFxn posting the semaphore */
            Semaphore_pend(semHandle, BIOS_WAIT_FOREVER);

            System_printf("tsk1_func: Received request #%d from %s\n", seq,
                MultiProc_getName(recvProcId));

            /* increment for remote iteration */
            i++;
        }
    }
    else {
        while (seq < NUMLOOPS) {
            /* wait forever on a semaphore, semaphore is posted in callback */
            Semaphore_pend(semHandle, BIOS_WAIT_FOREVER);

            System_printf("tsk1_func: Received request #%d from %s\n", seq,
                MultiProc_getName(recvProcId));

            /* Send an event to the remote processor */
            status = Notify_sendEvent(dstProc, INTERRUPT_LINE, EVENTID, seq, 
                    TRUE);
            if (status < 0) {
                System_abort("sendEvent failed\n");
            }

            System_printf("tsk1_func: Sent request #%d to %s\n", seq,
                MultiProc_getName(dstProc));
        }
    }

    System_printf("Test completed\n");
    
    BIOS_exit(0);
}
开发者ID:skitlab,项目名称:ti-ipc,代码行数:58,代码来源:notify_f28m35x.c

示例11: runBenchmarks

/*
 *  ======== runBenchmarks ========
 *  Run the CyaSSL benchmark application
 */
void runBenchmarks(UArg arg0, UArg arg1)
{
    void *args = NULL;
    msTimer_init();

    System_printf("Running benchmarks...\n");
    System_flush();
    benchmark_test(args);
    System_printf("Benchmarks completed.\n");

    BIOS_exit(0);
}
开发者ID:hongxiong,项目名称:wolfssl-examples,代码行数:16,代码来源:cyassl_tirtos_benchmark.c

示例12: imu_init

void imu_init() {
	// Initialize SPI
	System_printf("Initializing IMU\n");
	garbage = garbage; // Just avoid a warning for the never USED variable.

	imu_init_spia();
	if (imu_test()) {
		System_printf("IMU - Test successfully finished.");
	} else {
		System_printf("IMU - Test failed!");
	}
}
开发者ID:Rentier,项目名称:daidalos,代码行数:12,代码来源:imu.c

示例13: main

/* ARGSUSED */
int main(Int argc, Char * argv[])
{
    IRES_Status        status;

    /* Set default Diags mask to all, to get trace for init() functions */
    FCSettings_init();
    Diags_setMask(FCSETTINGS_MODNAME"+EX1234567");

    buf = Memory_calloc(NULL, BUFSIZE, BUFALIGN, NULL);

    if (buf == NULL) {
        System_abort("Allocation of buffer for BUFRES failed. Aborting.\n");
    }

    status = RMAN_init();

    //Diags_setMask(RMAN_MODNAME"+EX1234567");

    if (IRES_OK != status) {
        System_printf("main> RMAN initialization Failed [%d]\n", status);
        System_abort("Aborting...\n");
    }

    config.iresConfig.size = sizeof(BUFRES_Params);
//    config.iresConfig.allocFxn = _ALG_allocMemory;
//    config.iresConfig.freeFxn = _ALG_freeMemory;
    config.iresConfig.allocFxn = DSKT2_allocPersistent;
    config.iresConfig.freeFxn = DSKT2_freePersistent;

    config.base = buf;
    config.length = (UInt32)BUFSIZE;

    status = RMAN_register(&BUFRES_MGRFXNS, (IRESMAN_Params *)&config);

    /*
     *  Now that are resource is initialized,
     *  set default Diags mask to warnings and errors
     */
    Diags_setMask(FCSETTINGS_MODNAME"-EX12345");
    //Diags_setMask(BUFRES_MODNAME"-EX12345");

    if (status != IRES_OK) {
        /* Test failed */
        System_printf("BUFRES_init() failed [0x%x]\n", status);
        System_abort("Aborting.\n");
        return (-1);
    }

    smain(argc, argv);

    return (0);
}
开发者ID:andreimironenko,项目名称:framework_components,代码行数:53,代码来源:main_native.c

示例14: RPC_SKEL_GetHandle

static RPC_OMX_ERRORTYPE RPC_SKEL_GetHandle(Void *srvc, UInt32 size,
                                           UInt32 *data)
{
    char              cComponentName[128] = {0};
    OMX_HANDLETYPE    hComp;
    Char              cb_data[HDRSIZE + OMXPACKETSIZE + PAYLOAD_SIZE] =  {0};

    /*
     * Note: Currently, rpmsg_omx linux driver expects an omx_msg_hdr in front
     * of the omx_packet data, so we allow space for this:
     */
    struct omx_msg_hdr * hdr = (struct omx_msg_hdr *)cb_data;
    struct omx_packet  * packet = (struct omx_packet *)hdr->data;


    //Marshalled:[>offset(cParameterName)|>pAppData|>offset(RcmServerName)|>pid|
    //>--cComponentName--|>--CallingCorercmServerName--|
    //<hComp]

    strcpy(cComponentName, (char *)data + sizeof(map_info_type));

#if CHATTER
    System_printf("RPC_SKEL_GetHandle: Component Name received: %s\n",
                  cComponentName);
#endif

    /* Simulate sending an async OMX callback message, passing an omx_packet
     * structure.
     */
    packet->msg_id  = 99;   // Set to indicate callback instance, buffer id, etc.
    packet->fxn_idx = 5;    // Set to indicate callback fxn
    packet->data_size = PAYLOAD_SIZE;
    strcpy((char *)packet->data, CALLBACK_DATA);

#if CHATTER
    System_printf("RPC_SKEL_GetHandle: Sending callback message id: %d, "
                  "fxn_id: %d, data: %s\n",
                  packet->msg_id, packet->fxn_idx, packet->data);
#endif
    ServiceMgr_send(srvc, cb_data, CALLBACK_DATA_SIZE);

    /* Call OMX_Get_Handle() and return handle for future calls. */
    //eCompReturn = OMX_GetHandle(&hComp, (OMX_STRING)&cComponentName[0], pAppData,&rpcCallBackInfo);
    hComp = 0x5C0FFEE5;
    data[0] = hComp;

#if CHATTER
    System_printf("RPC_SKEL_GetHandle: returning hComp: 0x%x\n", hComp);
#endif

    return(0);
}
开发者ID:lifani,项目名称:CppCode,代码行数:52,代码来源:test_omx.c

示例15: main

/*
 *  ======== main ========
 */
Int main(Int argc, Char* argv[])
{
    UInt32 myArg1 = 12345;
    UInt32 myArg2 = 67890;
    UInt16 myProcId = MultiProc_self();
    Int status;
    
    /* Register the functions to be called */
    System_printf("Registering myFxn1 & myArg1 to event #%d..\n", EVENT);
    Notify_registerEvent(myProcId, 0, EVENT,
                         (Notify_FnNotifyCbck)myFxn1, (UArg)&myArg1);

    System_printf("Registering myFxn2 & myArg2 to event #%d..\n", EVENT);
    Notify_registerEvent(myProcId, 0, EVENT,
                         (Notify_FnNotifyCbck)myFxn2, (UArg)&myArg2);

    /* Send an event */
    System_printf("Sending event #%d (myFxn1 and myFxn2 should run)\n", EVENT);
    Notify_sendEvent(myProcId, 0, EVENT, 0xaaaaa, TRUE);

    /* Unregister one of the functions */
    System_printf("Unregistering myFxn1 + myArg1\n");
    status = Notify_unregisterEvent(myProcId, 0, EVENT,
                                    (Notify_FnNotifyCbck)myFxn1, 
                                    (UArg)&myArg1);
    if (status < 0) {
        System_abort("Listener not found! (THIS IS UNEXPECTED)\n");
    }

    /* Send an event */
    System_printf("Sending event #%d (myFxn2 should run)\n", EVENT);
    Notify_sendEvent(myProcId, 0, EVENT, 0xbbbbb, TRUE);

    /* Disable event */
    System_printf("Disabling event #%d:\n", EVENT);
    Notify_disableEvent(myProcId, 0, EVENT);

    /* Send an event (nothing should happen) */
    System_printf("Sending event #%d (nothing should happen)\n", EVENT);
    Notify_sendEvent(myProcId, 0, EVENT, 0xbbbbb, TRUE);

    /* Enable event */
    System_printf("Enabling event #%d:\n", EVENT);
    Notify_enableEvent(myProcId, 0, EVENT);

    /* Send an event */
    System_printf("Sending event #%d (myFxn2 should run)\n", EVENT);
    Notify_sendEvent(myProcId, 0, EVENT, 0xbbbbb, TRUE);
    
    System_printf("Test completed\n");
    return (0);
}
开发者ID:andreimironenko,项目名称:ipc,代码行数:55,代码来源:notify_loopback.c


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