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


C++ putsUART函数代码示例

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


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

示例1: WF_AssertionFailed

void WF_AssertionFailed(UINT8 moduleNumber, UINT16 lineNumber) 
{
    #if defined(STACK_USE_UART)
    char buf[8];
    
    putrsUART("WF ASSERTION: Module Number = ");
    
    sprintf(buf, "%d  ", moduleNumber);
    putsUART(buf);
    
    putrsUART("Line Number = ");
    
    sprintf(buf, "%d", lineNumber);
    putsUART(buf);
    #endif
    
    #if defined(USE_LCD)
    {
        char buf[] = {WIFI_ASSERT_STRING};
        memset(LCDText, ' ', sizeof(LCDText));
        memcpy((void *)LCDText, (void *)buf, strlen(buf));
        uitoa(moduleNumber, (BYTE*)buf);
        memcpy((void *)&LCDText[18], (void *)buf, strlen(buf));
        LCDText[23] = 'L';
        LCDText[24] = ':';
        uitoa(lineNumber, &LCDText[25]);
        LCDUpdate();
    }    
    #endif

    
    while(1);
}    
开发者ID:OptecInc,项目名称:FocusLynxWiFiModuleFW,代码行数:33,代码来源:WF_Config.c

示例2: printStatus

void printStatus(STATUS *st)
{
	sprintf(outBuf,"\r\n\r\nDI:%u",st->heading);
	putsUART(outBuf);
	sprintf(outBuf,"\r\nLO:%u",st->location);
	putsUART(outBuf);
	sprintf(outBuf,"\r\nOC:%u",st->obzEntrCnt);
	putsUART(outBuf);
}
开发者ID:rushipatel,项目名称:ANTZ,代码行数:9,代码来源:antz.c

示例3: iwconfigGetMacStats

BOOL iwconfigGetMacStats(void)
{
    tWFMacStats my_WFMacStats;
    WF_GetMacStats(&my_WFMacStats);

    putsUART("MibRxMICFailureCounts = ");
    {
        char buf_t[16];
        sprintf(buf_t,"%u",(unsigned int)(my_WFMacStats.MibRxMICFailureCtr));
        putsUART(buf_t);
    }
    //putsUART("\r\n");
    return TRUE;
}
开发者ID:cnkker,项目名称:Microchip,代码行数:14,代码来源:WFConsoleIwconfig.c

示例4: CursorRight_N

/*= CursorRight_N ==============================================================
Purpose: Moves the cursor left N characters to the right

Inputs:  n -- number of characters to move the cursor to the left

         Note: This sequence only takes a single digit of length, so may need to
               do the move in steps


Returns: none
============================================================================*/
void CursorRight_N(UINT8 n)
{
   INT8 sequence_string[sizeof(cursorRightEscapeSequence) + 2];  /* null and extra digit */

//   ASSERT(n <= (strlen(g_ConsoleContext.buf) + CMD_LINE_PROMPT_LENGTH));

   if (n > 0u)
   {
      SET_CURSOR( GET_CURSOR() + n );
      sequence_string[0] = cursorRightEscapeSequence[0]; /* ESC */
      sequence_string[1] = cursorRightEscapeSequence[1];  /* '[' */

      if (n < 10u)
      {
         sequence_string[2] = n + '0';  /* ascii digit */
         sequence_string[3] = cursorRightEscapeSequence[3];    /* 'C' */
         sequence_string[4] = '\0';
      }
      else
      {
         sequence_string[2] = (n / 10) + '0';  /* first ascii digit  */
         sequence_string[3] = (n % 10) + '0';  /* second ascii digit */
         sequence_string[4] = cursorRightEscapeSequence[3];    /* 'C' */
         sequence_string[5] = '\0';

      }

      putsUART( (char *) sequence_string);
   }
}
开发者ID:Bobeye,项目名称:cta2045-wifi-modules,代码行数:41,代码来源:WFConsole.c

示例5: RawSetByte

/*****************************************************************************
 * FUNCTION: RawSetByte
 *
 * RETURNS: None
 *
 * PARAMS:
 *      rawId   - RAW ID
 *      pBuffer - Buffer containing bytes to write
 *      length  - number of bytes to read
 *
 *  NOTES: Writes bytes to RAW window
 *****************************************************************************/
void RawSetByte(UINT16 rawId, UINT8 *pBuffer, UINT16 length)
{
    UINT8 regId;
#if defined(OUTPUT_RAW_TX_RX)
    UINT16 i;
#endif    


    /* if previously set index past legal range and now trying to write to RAW engine */
    if ( (rawId == 0) && g_rxIndexSetBeyondBuffer && (GetRawWindowState(RAW_TX_ID) == WF_RAW_DATA_MOUNTED) )
    {
//        WF_ASSERT(FALSE);  /* attempting to write past end of RAW window */
    }

    /* write RAW data to chip */
    regId = (rawId==RAW_ID_0)?RAW_0_DATA_REG:RAW_1_DATA_REG;
    WriteWFArray(regId, pBuffer, length);

#if defined(OUTPUT_RAW_TX_RX)
    for (i = 0; i < length; ++i)
    {
        char buf[16];
        sprintf(buf,"T: %#x\r\n", pBuffer[i]);
        putsUART(buf);
    }    
#endif

}
开发者ID:sidwarkd,项目名称:waterworx-device,代码行数:40,代码来源:WFDriverRaw.c

示例6: do_ping_cmd

void do_ping_cmd(void)
{
	int i;

	if(ARGC < 2u)
	{
		putsUART("Please input destination: ping xx.xx.xx.xx count\r\n");
		return;
	}
	for(i=0;i<strlen((const char*)ARGV[1]);i++) PING_Console_Host[i] = ARGV[1][i];
	if(ARGC == 3u)
	{
#if defined (STACK_USE_CERTIFICATE_DEBUG)
		if( strcmppgm2ram((char*)ARGV[2], "forever") == 0)
		{
			b_PingFroever = TRUE;
		}
		else
#endif
			sscanf((const char*)ARGV[2],"%d",(int*)&Count_PingConsole);
	}
	else 
		Count_PingConsole = 4;

}
开发者ID:Athuli7,项目名称:Microchip,代码行数:25,代码来源:WFConsoleMsgHandler.c

示例7: RawGetByte

/*****************************************************************************
 * FUNCTION: RawGetByte
 *
 * RETURNS: error code
 *
 * PARAMS:
 *      rawId   - RAW ID
 *      pBuffer - Buffer to read bytes into
 *      length  - number of bytes to read
 *
 *  NOTES: Reads bytes from the RAW engine
 *****************************************************************************/
void RawGetByte(UINT16 rawId, UINT8 *pBuffer, UINT16 length)
{
    UINT8 regId;
#if defined(OUTPUT_RAW_TX_RX)
	char buf[8];
#endif

    /* if reading a data message do following check */
    if (!g_WaitingForMgmtResponse)
    {
        // if RAW index previously set out of range and caller is trying to do illegal read
        if ((rawId == RAW_RX_ID)		&&
			g_rxIndexSetBeyondBuffer	&& 
			(GetRawWindowState(RAW_RX_ID) == WF_RAW_DATA_MOUNTED))
        {
            WF_ASSERT(FALSE);  /* attempting to read past end of RAW buffer */
        }
    }

    regId = (rawId == RAW_ID_0) ? RAW_0_DATA_REG : RAW_1_DATA_REG;
    ReadWFArray(regId, pBuffer, length);

#if defined(OUTPUT_RAW_TX_RX)
	putrsUART("R:");
    while (length-- != 0)
    {
        sprintf(buf," %02X", *pBuffer++);
        putsUART(buf);
    }
	putrsUART("\r\n");
#endif

}
开发者ID:guillaume9433,项目名称:Microchip,代码行数:45,代码来源:WFDriverRaw.c

示例8: RawSetByte

/*****************************************************************************
 * FUNCTION: RawSetByte
 *
 * RETURNS: None
 *
 * PARAMS:
 *      rawId   - RAW ID
 *      pBuffer - Buffer containing bytes to write
 *      length  - number of bytes to read
 *
 *  NOTES: Writes bytes to RAW window
 *****************************************************************************/
void RawSetByte(UINT16 rawId, UINT8 *pBuffer, UINT16 length)
{
    UINT8 regId;
#if defined(OUTPUT_RAW_TX_RX)
	char buf [8];
#endif    


    /* if previously set index past legal range and now trying to write to RAW engine */
    if ( (rawId == 0) && g_rxIndexSetBeyondBuffer && (GetRawWindowState(RAW_TX_ID) == WF_RAW_DATA_MOUNTED) )
    {
//        WF_ASSERT(FALSE);  /* attempting to write past end of RAW window */
    }

    /* write RAW data to chip */
    regId = (rawId == RAW_ID_0) ? RAW_0_DATA_REG : RAW_1_DATA_REG;
    WriteWFArray(regId, pBuffer, length);

#if defined(OUTPUT_RAW_TX_RX)
	putrsUART("T:");
    while (length-- != 0)
    {
        sprintf(buf," %02X", *pBuffer++);
        putsUART(buf);
    }
	putrsUART("\r\n");
#endif

}
开发者ID:guillaume9433,项目名称:Microchip,代码行数:41,代码来源:WFDriverRaw.c

示例9: RawGetByte

/*****************************************************************************
 * FUNCTION: RawGetByte
 *
 * RETURNS: error code
 *
 * PARAMS:
 *      rawId   - RAW ID
 *      pBuffer - Buffer to read bytes into
 *      length  - number of bytes to read
 *
 *  NOTES: Reads bytes from the RAW engine
 *****************************************************************************/
void RawGetByte(uint16_t rawId, uint8_t *pBuffer, uint16_t length)
{
    uint8_t regId;
#if defined(OUTPUT_RAW_TX_RX)
    uint16_t i;
#endif

    /* if reading a data message do following check */
    if (!g_WaitingForMgmtResponse)
    {
        // if RAW index previously set out of range and caller is trying to do illegal read
        if ( (rawId==RAW_RX_ID)        &&
             g_rxIndexSetBeyondBuffer  &&
             (GetRawWindowState(RAW_RX_ID) == WF_RAW_DATA_MOUNTED) )
        {
            WF_ASSERT(false);  /* attempting to read past end of RAW buffer */
        }
    }

    regId = (rawId==RAW_ID_0) ? RAW_0_DATA_REG:RAW_1_DATA_REG;
    ReadWFArray(regId, pBuffer, length);

#if defined(OUTPUT_RAW_TX_RX)
    for (i = 0; i < length; ++i)
    {
        char buf[16];
        sprintf(buf,"R: %#x\r\n", pBuffer[i]);
        putsUART(buf);
    }
#endif
}
开发者ID:243-510-MA,项目名称:243-510-A15,代码行数:43,代码来源:drv_wifi_raw.c

示例10: WFDisplayScanMgr

extern void
WFDisplayScanMgr()
{
    tWFScanResult   bssDesc;
    char ssid[32];
	char rssiChan[48];

    if (SCANCXT.numScanResults == 0)
       return;
    if (!IS_SCAN_STATE_DISPLAY(SCANCXT.scanState))
       return;

    if (IS_SCAN_IN_PROGRESS(SCANCXT.scanState))
       return;

    if (!IS_SCAN_STATE_VALID(SCANCXT.scanState))
       return;

    WFRetrieveScanResult(SCANCXT.displayIdx, &bssDesc);

    /* Display SSID */
    sprintf(ssid, "%s\r\n", bssDesc.ssid);
    putsUART(ssid);

	/* Display SSID  & Channel */
    /* RSSI_MAX : 200, RSSI_MIN : 106 */
    sprintf(rssiChan, "  => RSSI: %u, Channel: %u\r\n", bssDesc.rssi, bssDesc.channel);
    putsUART(rssiChan);

    if (++SCANCXT.displayIdx == SCANCXT.numScanResults)  {
        SCAN_CLEAR_DISPLAY(SCANCXT.scanState);
        SCANCXT.displayIdx = 0;
#if defined(WF_CONSOLE)
        WFConsoleReleaseConsoleMsg();
#endif
    }

    return;
}
开发者ID:AleSuky,项目名称:SkP32v1.1,代码行数:39,代码来源:WFEasyConfig.c

示例11: slow_event_handler

/*******************************************************
* "Soft" real-time event handler for slow rate
********************************************************/
void slow_event_handler(void)
{
    if(slow_event_count > slow_ticks_limit)
    {
        slow_event_count = 0;
        
        if(control_flags.first_scan)
        {
            putsUART((unsigned char *)WelcomeMsg,&UART1);
            //putsUART((unsigned char *)WelcomeMsg,&UART2);
            
            control_flags.first_scan = 0;
        }

        // (RAM) Parameters update management
        if(control_flags.PAR_update_req)
        {
            update_params();
            control_flags.PAR_update_req = 0;
        }
        
        if(direction_flags.word != direction_flags_prev)
        {
            // RESET COUNTS
            QEI1_Init();
            QEI2_Init();
            Timer1_Init();
            Timer4_Init();
            direction_flags_prev = direction_flags.word;
        }

        // EEPROM update management
        if(control_flags.EE_update_req)
        {
			control_flags.EE_update_req = 0;
        }

        update_delta_joints();
		update_delta_EE();//aggiornamento delle strutture dati
        status_flags.homing_done = home_f.done;

        // SACT protocol timeout manager (see SACT_protocol.c)
        SACT_timeout();
		SACT_SendSDP();
		SACT_SendSSP();

        // CONTROL MODE STATE MANAGER
        control_mode_manager();

    } // END IF slow_event_count..
}// END slow_event_handler
开发者ID:Roberto5,项目名称:rawbot,代码行数:54,代码来源:main.c

示例12: OutputMacAddress

static void OutputMacAddress(void)
{
    UINT8 mac[6];
    int i;
    char buf[4];

    WF_GetMacAddress(mac);
    for (i = 0; i < 6; ++i)
    {
        sprintf(buf, "%02X ", mac[i]);
        putsUART(buf);
    }
    putrsUART("\r\n");
}
开发者ID:cnkker,项目名称:Microchip,代码行数:14,代码来源:WFConsoleIwconfig.c

示例13: DisplayIPValue

// Writes an IP address to the LCD display and the UART as available
void DisplayIPValue(IP_ADDR IPVal)
{
//	printf("%u.%u.%u.%u", IPVal.v[0], IPVal.v[1], IPVal.v[2], IPVal.v[3]);
#if defined (__dsPIC33E__) || defined (__PIC24E__)
	static BYTE IPDigit[4];    					/* Needs to be declared as static to avoid the array getting optimized by C30 v3.30 compiler for dsPIC33E/PIC24E. 
												   Otherwise the LCD displays corrupted IP address on Explorer 16. To be fixed in the future compiler release*/
#else
    BYTE IPDigit[4];
#endif
	BYTE i;
#ifdef USE_LCD
	BYTE j;
	BYTE LCDPos=16;
#endif

	for(i = 0; i < sizeof(IP_ADDR); i++)
	{
	    uitoa((WORD)IPVal.v[i], IPDigit);

		#if defined(STACK_USE_UART)
			putsUART((char *) IPDigit);
		#endif

		#ifdef USE_LCD
			for(j = 0; j < strlen((char*)IPDigit); j++)
			{
				LCDText[LCDPos++] = IPDigit[j];
			}
			if(i == sizeof(IP_ADDR)-1)
				break;
			LCDText[LCDPos++] = '.';
		#else
			if(i == sizeof(IP_ADDR)-1)
				break;
		#endif

		#if defined(STACK_USE_UART)
			while(BusyUART());
			WriteUART('.');
		#endif
	}

	#ifdef USE_LCD
		if(LCDPos < 32u)
			LCDText[LCDPos] = 0;
		LCDUpdate();
	#endif
}
开发者ID:davidbroin,项目名称:controlIOPIC18Eth,代码行数:49,代码来源:MainDemo.c

示例14: SetMode_idle

static UINT8 SetMode_idle(void)
{
    UINT8 networkType;

    WF_CPGetNetworkType(iwconfigCb.cpId, &networkType);

    if (FALSE == iwconfigCb.isIdle )
    {
        if (WF_CMDisconnect() != WF_SUCCESS)
        {
            putsUART("Disconnect failed. Disconnect is allowed only when module is in connected state\r\n");
        }
        WF_PsPollDisable();
#ifdef STACK_USE_CERTIFICATE_DEBUG
        DelayMs(100);
#endif
    }
    return networkType;
}
开发者ID:cnkker,项目名称:Microchip,代码行数:19,代码来源:WFConsoleIwconfig.c

示例15: DisplayIPValue

// Writes an IP address to the LCD display and the UART as available
void DisplayIPValue(IP_ADDR IPVal)
{
//	printf("%u.%u.%u.%u", IPVal.v[0], IPVal.v[1], IPVal.v[2], IPVal.v[3]);
    BYTE IPDigit[4];
	BYTE i;
#ifdef USE_LCD
	BYTE j;
	BYTE LCDPos=16;
#endif

	for(i = 0; i < sizeof(IP_ADDR); i++)
	{
	    uitoa((WORD)IPVal.v[i], IPDigit);

		#if defined(STACK_USE_UART)
			putsUART((char *) IPDigit);
		#endif

		#ifdef USE_LCD
			for(j = 0; j < strlen((char*)IPDigit); j++)
			{
				LCDText[LCDPos++] = IPDigit[j];
			}
			if(i == sizeof(IP_ADDR)-1)
				break;
			LCDText[LCDPos++] = '.';
		#else
			if(i == sizeof(IP_ADDR)-1)
				break;
		#endif

		#if defined(STACK_USE_UART)
			while(BusyUART());
			WriteUART('.');
		#endif
	}

	#ifdef USE_LCD
		if(LCDPos < 32u)
			LCDText[LCDPos] = 0;
		LCDUpdate();
	#endif
}
开发者ID:OptecInc,项目名称:FocusLynx_FW,代码行数:44,代码来源:MainDemo.c


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