这篇教程C++ xSerialPutChar函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xSerialPutChar函数的典型用法代码示例。如果您正苦于以下问题:C++ xSerialPutChar函数的具体用法?C++ xSerialPutChar怎么用?C++ xSerialPutChar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xSerialPutChar函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: vSerialPutStringvoid vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength ){signed char *pxNext; /* A couple of parameters that this port does not use. */ ( void ) usStringLength; ( void ) pxPort; /* NOTE: This implementation does not handle the queue being full as no block time is used! */ /* The port handle is not required as this driver only supports UART0. */ ( void ) pxPort; /* Send each character in the string, one at a time. */ pxNext = ( signed char * ) pcString; while( *pxNext ) { xSerialPutChar( pxPort, *pxNext, serNO_BLOCK ); pxNext++; }}
开发者ID:BirdBare,项目名称:STM32F4-Discovery_FW_V1.1.0_Makefiles,代码行数:21,
示例2: portTASK_FUNCTIONstatic portTASK_FUNCTION( vComTxTask, pvParameters ){signed char cByteToSend;portTickType xTimeToWait; /* Just to stop compiler warnings. */ ( void ) pvParameters; for( ;; ) { /* Simply transmit a sequence of characters from comFIRST_BYTE to comLAST_BYTE. */ for( cByteToSend = comFIRST_BYTE; cByteToSend <= comLAST_BYTE; cByteToSend++ ) { if( xSerialPutChar( xPort, cByteToSend, comNO_BLOCK ) == pdPASS ) { vParTestToggleLED( uxBaseLED + comTX_LED_OFFSET ); } } /* Turn the LED off while we are not doing anything. */ vParTestSetLED( uxBaseLED + comTX_LED_OFFSET, pdFALSE ); /* We have posted all the characters in the string - wait before re-sending. Wait a pseudo-random time as this will provide a better test. */ xTimeToWait = xTaskGetTickCount() + comOFFSET_TIME; /* Make sure we don't wait too long... */ xTimeToWait %= comTX_MAX_BLOCK_TIME; /* ...but we do want to wait. */ if( xTimeToWait < comTX_MIN_BLOCK_TIME ) { xTimeToWait = comTX_MIN_BLOCK_TIME; } vTaskDelay( xTimeToWait ); }} /*lint !e715 !e818 pvParameters is required for a task function even if it is not referenced. */
开发者ID:LinuxJohannes,项目名称:FreeRTOS,代码行数:40,
示例3: prvUSARTEchoTask/* Described at the top of this file. */static void prvUSARTEchoTask( void *pvParameters ){signed char cChar;/* String declared static to ensure it does not end up on the stack, no matterwhat the optimisation level. */static const char *pcLongishString = "ABBA was a Swedish pop music group formed in Stockholm in 1972, consisting of Anni-Frid Frida Lyngstad, ""Bj C++ xT函数代码示例 C++ xSemaphoreTakeRecursive函数代码示例
|