亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? debug.c

?? CYRF6936 zigbee模塊設(shè)計(jì)的全部資料
?? C
字號(hào):
//--------------------------------------------------------------------------
//
//  Filename:     debug.c
//
//  Description:
//
//--------------------------------------------------------------------------
// $Archive: /WirelessUSB/WUSB Kits/CY3630 LP EVK/DocSrc/CD_Root/Firmware/Source/Unsupported/NetworkQuality/debug.c $
// $Modtime: 3/01/06 6:04p $
// $Revision: 3 $
//--------------------------------------------------------------------------
//
// Copyright 2003-2006, Cypress Semiconductor Corporation.
//
// This software is owned by Cypress Semiconductor Corporation (Cypress)
// and is protected by and subject to worldwide patent protection (United
// States and foreign), United States copyright laws and international
// treaty provisions. Cypress hereby grants to licensee a personal,
// non-exclusive, non-transferable license to copy, use, modify, create
// derivative works of, and compile the Cypress Source Code and derivative
// works for the sole purpose of creating custom software in support of
// licensee product to be used only in conjunction with a Cypress integrated
// circuit as specified in the applicable agreement. Any reproduction,
// modification, translation, compilation, or representation of this
// software except as specified above is prohibited without the express
// written permission of Cypress.
//
// Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// Cypress reserves the right to make changes without further notice to the
// materials described herein. Cypress does not assume any liability arising
// out of the application or use of any product or circuit described herein.
// Cypress does not authorize its products for use as critical components in
// life-support systems where a malfunction or failure may reasonably be
// expected to result in significant injury to the user. The inclusion of
// Cypress' product in a life-support systems application implies that the
// manufacturer assumes all risk of such use and in doing so indemnifies
// Cypress against all charges.
//
// Use may be limited by and subject to the applicable Cypress software
// license agreement.
//
//--------------------------------------------------------------------------


//--------------------------------------
// Included files
//--------------------------------------
#include "PSoCAPI.h"
#include "debug.h"
#include "globalparams.h"
#include "psocgpioint.h"

#if defined(DEBUG)

//--------------------------------------
// Local Definitions and Types
//--------------------------------------
//--------------------------------------
// Local Function Declarations
//--------------------------------------

void OutNibble(unsigned char nibble);


//--------------------------------------
// Local Definitions
//--------------------------------------

#if defined(SOFT_SERIAL_TX)

#if (CPU_CLOCK == 2)	// 24MHz
 #warning Soft serial transmitter is not supported in 24MHz
#elif (CPU_CLOCK == 3)	// 12MHz
 //-------------------------------------------------------------------------
 // The BitDelay needs to burn 73 cycles. The next two functions do that.
 // It was written to favor fewer instructions rather than a series of nop's
 void BitDelayLevel2() // call takes 11 cycles, 2 bytes
 {
     asm("index 0"); // index is 13 cycles, 2 bytes
     // return is 8 cycles, 1 byte
 }
 void BitDelayLevel1() // call takes 11 cycles, 2 bytes
 {
     asm("index 0"); // index is 13 cycles, 2 bytes

     BitDelayLevel2();

     // A nop takes 4 cycles, 1 byte
     // cmp A,3 is 5 cycles, 2 bytes
     asm("nop"); asm("cmp A,3");

     // return is 8 cycles, 1  byte
 }

 #define BitDelay BitDelayLevel1()
 //-------------------------------------------------------------------------
#elif (CPU_CLOCK == 1) // 3 MHz
 #define BitDelay
#else
 #warning Soft serial transmitter is not supported at this clock speed
#endif
 
//--------------------------------------------------------------------------
//
//  Function:    Serial_Tx_SendData
//
//  Description: Generate a SW UART, n,8,1,115.2k on UART_TX port
//				 This has been tuned for a 12mhz cpu
//
//  Inputs:      char
//
//--------------------------------------------------------------------------
void Serial_Tx_SendData(unsigned char Data)
{
//    M8C_DisableGInt;
    // Out put start bit
    UART_TX_Data_ADDR &= ~UART_TX_MASK;
    BitDelay;
#if (CPU_CLOCK == 3)	// 12MHz
    asm("nop");
#endif

    // output bit 0
    if(Data & 0x01)
        UART_TX_Data_ADDR |= UART_TX_MASK;
    else
    {
        UART_TX_Data_ADDR &= ~UART_TX_MASK;
        asm("nop"); // This balances out the jump used by the other half of the if clause
    }
 
    BitDelay;
   
    // Output bit 1
    if(Data & 0x02)
        UART_TX_Data_ADDR |= UART_TX_MASK;
    else
    {
        UART_TX_Data_ADDR &= ~UART_TX_MASK;
        asm("nop");
    }
    BitDelay;
    // Output bit 2
    if(Data & 0x04)
        UART_TX_Data_ADDR |= UART_TX_MASK;
    else
    {
        UART_TX_Data_ADDR &= ~UART_TX_MASK;
        asm("nop");
    }
    BitDelay;
    // Output bit 3
    if(Data & 0x08)
        UART_TX_Data_ADDR |= UART_TX_MASK;
    else
    {
        UART_TX_Data_ADDR &= ~UART_TX_MASK;
        asm("nop");
    }
    BitDelay;
    // Output bit 4
    if(Data & 0x10)
        UART_TX_Data_ADDR |= UART_TX_MASK;
    else
    {
        UART_TX_Data_ADDR &= ~UART_TX_MASK;
        asm("nop");
    }
    BitDelay;
    // Output bit 5
    if(Data & 0x20)
        UART_TX_Data_ADDR |= UART_TX_MASK;
    else
    {
        UART_TX_Data_ADDR &= ~UART_TX_MASK;
        asm("nop");
    }
    BitDelay;
    // Output bit 6
    if(Data & 0x40)
        UART_TX_Data_ADDR |= UART_TX_MASK;
    else
    {
        UART_TX_Data_ADDR &= ~UART_TX_MASK;
        asm("nop");
    }
    BitDelay;
    // Output bit 7
    if(Data & 0x80)
        UART_TX_Data_ADDR |= UART_TX_MASK;
    else
    {
        UART_TX_Data_ADDR &= ~UART_TX_MASK;
        asm("nop");
    }
    BitDelay;
    // Do pairty
#if (CPU_CLOCK == 3)	// 12MHz
    asm("nop");
    asm("nop");
    asm("nop");
    asm("nop");
    asm("nop");
#endif
   
    UART_TX_Data_ADDR |= UART_TX_MASK;
    BitDelay;
   
    // Do stop bit
#if (CPU_CLOCK == 3)	// 12MHz
    asm("nop");
    asm("nop");
    asm("nop");
    asm("nop");
    asm("nop");
#endif
   
    UART_TX_Data_ADDR |= UART_TX_MASK;
//    M8C_EnableGInt;
    BitDelay;
}   
#endif // defined(SOFT_SERIAL_TX)
 
 
//--------------------------------------------------------------------------
//
//  Function:    GetChar
//
//  Description: Reads characters from the serial port
//
//  Returns:     Character read or 0x00 if not character read
//
//--------------------------------------------------------------------------
BYTE GetChar()
{
	//Stay here until a char is received via RX serial port!
//	if (!(Serial_Rx_CONTROL_REG & RX8_RX_COMPLETE ))
	{
		return 0x00;
	}

//	return Serial_Rx_RX_BUFFER_REG;
}


//--------------------------------------------------------------------------
//
//  Function:    OutChar
//
//  Description: Ouput a character to the serial port
//
// TODO, test more to find out why the data overruns soemtime with testing for empty
//
//  Inputs:      char
//
//--------------------------------------------------------------------------
#if !defined(SOFT_SERIAL_TX)
void OutChar(unsigned char data)
{
	// Wait for the last byte to be sent.
    while(!(Serial_Tx_CONTROL_REG & Serial_Tx_TX_BUFFER_EMPTY));
    
	// write a byte
	Serial_Tx_TX_BUFFER_REG = data;
}
#endif


//--------------------------------------------------------------------------
//
//  Function:    OutStr
//
//  Description: Writes a string to the serial port
//
//  Inputs:      uchar
//
//--------------------------------------------------------------------------
void OutStr(const unsigned char *pbStrPtr)
{
   // loop for the null terminated string
   while ( *pbStrPtr != 0 )
   {
       // write a character
       OutChar( *pbStrPtr );

       // point to the next character
       pbStrPtr++;
   }
}


//--------------------------------------------------------------------------
//
//  Function:    OutStrData
//
//  Description: Writes a string to the serial port
//
//  Inputs:      uchar
//
//--------------------------------------------------------------------------
void OutStrData(unsigned char *pbStrPtr)
{
   // loop for the null terminated string
   while ( *pbStrPtr != 0 )
   {
       // write a character
       OutChar( *pbStrPtr );
          
       // point to the next character
       pbStrPtr++;
   }
}


//--------------------------------------------------------------------------
//
//  Function:    OutHex
//
//  Description: Converts a byte to a hex value
//
//  Inputs:      Byte to be printed
//
//--------------------------------------------------------------------------
void OutHex(unsigned char data)
{
	OutNibble(data >> 4);
	OutNibble(data);
}


//--------------------------------------------------------------------------
//
//  Function:    OutHex16
//
//  Description: Converts a word to a hex value
//
//  Inputs:      Two byte value to printed
//
//--------------------------------------------------------------------------
/* Using Macro version
void OutHex16(unsigned short data)
{
	// putchar is the more expensive HiTech version of putch
	// we're using putch to save on code space
	OutNibble(data >> 12);
	OutNibble(data >> 8);
	OutNibble(data >> 4);
	OutNibble(data);
}*/


//--------------------------------------------------------------------------
//
//  Function:    OutDec
//
//  Description: Converts both unsigned char and unsigned short to a decimal ascii value
//
//  Inputs:      Two byte or one byte value to be printed
//
//--------------------------------------------------------------------------
void OutDec(unsigned short u16DecByte)
{
	char decStr[6];
	unsigned char loop = 5;
	
	decStr[5] = '\0';
	
	while (loop)
	{
		// 22 code bytes cheaper here than in the while above
		--loop;
		
		decStr[loop] = (u16DecByte % 10) + '0';
		u16DecByte /= 10;
		
		if (u16DecByte == 0)
			break; // Kills leading zeros
	}
	
	OutStrData(&decStr[loop]);
}


//--------------------------------------------------------------------------
//
//  Function:    OutSignedDec8
//
//  Description: Prints sign if necessary then calls OutDec
//
//  Inputs:      I8 - the value you want to print
//
//--------------------------------------------------------------------------
void OutSignedDec8(char decByte)
{
	if (decByte & 0x80)
	{
		OutChar('-');
		decByte = 0 - decByte;
	}

	OutDec(decByte);
}


//--------------------------------------------------------------------------
//
//  Function:    OutNibble
//
//  Description: Convert a nibble to an ASCII value
//
//  Inputs:      Byte to be printed in ASCII
//
//--------------------------------------------------------------------------
void OutNibble(unsigned char nibble)
{
	nibble = nibble & 0x0F;

	if (nibble > 9)
	{
		nibble += ('A' - 10);
	}
	else
	{
		nibble += '0';
	}

	OutChar(nibble);
}

#endif // defined(DEBUG)

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人福利视频网站| 久久久久久久久久久黄色| 99精品视频在线观看| 成人国产一区二区三区精品| 国产大陆精品国产| 高清免费成人av| 成人黄色小视频| 91蝌蚪porny成人天涯| 色狠狠综合天天综合综合| 91福利在线看| 欧美丰满美乳xxx高潮www| 91精品国产色综合久久不卡蜜臀| 欧美一区三区四区| 精品免费日韩av| 久久久精品蜜桃| 国产精品色哟哟| 一区二区三区**美女毛片| 亚洲第一在线综合网站| 日韩主播视频在线| 国产一区二区三区国产| 成人高清视频免费观看| 一本一道久久a久久精品| 欧美视频一区二| 欧美xxxxxxxx| 中文av一区二区| 亚洲最大色网站| 免费看欧美美女黄的网站| 国产精品影视在线观看| 97se亚洲国产综合自在线不卡| 在线观看国产91| 欧美mv日韩mv| 亚洲视频一二三区| 视频在线观看一区| 国产成人免费视频网站高清观看视频 | 欧美成人在线直播| 国产精品久久久久久久蜜臀 | 国产乱码精品一品二品| 成人91在线观看| 欧美高清视频一二三区 | 欧美大片顶级少妇| 久久精品视频一区| 亚洲影院理伦片| 精品一区二区久久| 91美女视频网站| 在线播放亚洲一区| 国产精品入口麻豆原神| 天天射综合影视| 成人爽a毛片一区二区免费| 在线观看日韩高清av| 精品国产亚洲在线| 一区二区三区免费看视频| 久久精品av麻豆的观看方式| 一本久久a久久免费精品不卡| 日韩一区二区三区视频在线 | 亚洲第一福利视频在线| 国产不卡在线视频| 欧美一区二区三区白人| 亚洲婷婷在线视频| 激情五月婷婷综合| 欧美综合色免费| 国产精品青草综合久久久久99| 天堂久久一区二区三区| 一本久久a久久免费精品不卡| 精品不卡在线视频| 亚洲成人精品一区| 不卡av免费在线观看| 精品捆绑美女sm三区| 亚洲午夜久久久久久久久久久| 国产成人免费网站| 精品国产露脸精彩对白| 午夜影视日本亚洲欧洲精品| av亚洲产国偷v产偷v自拍| 久久精品人人做| 老司机午夜精品| 69p69国产精品| 亚洲一区二区三区四区在线| 粉嫩av亚洲一区二区图片| 欧美mv日韩mv亚洲| 日韩电影在线看| 欧美日精品一区视频| 国产精品第一页第二页第三页| 黄色成人免费在线| 日韩亚洲国产中文字幕欧美| 婷婷中文字幕综合| 在线观看国产一区二区| 亚洲激情一二三区| 色综合久久综合网97色综合| 欧美高清在线一区二区| 国产传媒欧美日韩成人| 久久久久久久久97黄色工厂| 久久91精品久久久久久秒播| 日韩欧美一区二区不卡| 日精品一区二区三区| 欧美精品久久一区| 亚洲国产aⅴ成人精品无吗| 91福利国产精品| 亚洲精品日韩一| 欧洲精品视频在线观看| 亚洲最大色网站| 欧美在线观看视频一区二区三区| 一区二区三区免费观看| 欧美性欧美巨大黑白大战| 亚洲美女少妇撒尿| 欧美专区亚洲专区| 亚欧色一区w666天堂| 欧美美女一区二区三区| 日韩电影免费在线观看网站| 91精品国产入口| 精品一区二区影视| 久久精品一区二区| 成人国产精品免费网站| 亚洲欧美色图小说| 91国产成人在线| 丝袜亚洲精品中文字幕一区| 日韩欧美高清一区| 国产一区二区精品久久99| 国产日产欧美一区二区视频| 国产成人在线视频网站| 国产精品成人网| 在线看一区二区| 蜜桃精品在线观看| 国产女人18毛片水真多成人如厕| www.在线欧美| 亚洲成人av一区二区| 欧美成人女星排名| 成人综合婷婷国产精品久久免费| 亚洲日韩欧美一区二区在线| 欧美性大战久久| 免费观看在线综合| 国产拍欧美日韩视频二区| 91麻豆国产自产在线观看| 午夜精品视频在线观看| 亚洲精品一区二区三区香蕉 | 精品久久久久一区| 成人av先锋影音| 亚洲高清免费视频| 久久男人中文字幕资源站| 91麻豆国产福利精品| 日本伊人精品一区二区三区观看方式| 精品国产一区二区三区久久影院| 成人免费视频免费观看| 亚洲成人综合视频| 国产欧美在线观看一区| 91福利在线播放| 国产一区二区免费看| 亚洲精品视频在线观看网站| 欧美va亚洲va在线观看蝴蝶网| 99国产欧美另类久久久精品| 日韩影院免费视频| 国产精品国产成人国产三级| 欧美一卡二卡在线观看| 成人免费视频免费观看| 免费看日韩a级影片| 亚洲欧美一区二区不卡| 欧美一区二区福利视频| 91一区在线观看| 久久av中文字幕片| 亚洲黄网站在线观看| 久久久久久久电影| 这里只有精品免费| 91视视频在线观看入口直接观看www | **网站欧美大片在线观看| 日韩免费一区二区三区在线播放| 色综合夜色一区| 国产成人a级片| 日本欧美大码aⅴ在线播放| 亚洲啪啪综合av一区二区三区| 欧美mv和日韩mv的网站| 欧美人牲a欧美精品| 91在线你懂得| 成人午夜碰碰视频| 狠狠色狠狠色综合| 日韩精品一二三四| 亚洲综合丝袜美腿| 中文字幕在线一区| www日韩大片| 日韩一区二区麻豆国产| 欧美日韩中文字幕一区二区| 不卡一区在线观看| 国产一区二区三区av电影| 麻豆精品在线看| 日韩—二三区免费观看av| 亚洲一级二级在线| 亚洲精品水蜜桃| 中文字幕欧美一| 欧美国产精品一区二区三区| www久久精品| 欧美成人官网二区| 欧美一三区三区四区免费在线看| 欧美在线小视频| 在线精品国精品国产尤物884a| 99re视频精品| av在线播放一区二区三区| 成人久久18免费网站麻豆| 国产酒店精品激情| 国产在线观看免费一区| 国产在线国偷精品免费看| 国内精品免费在线观看| 激情五月婷婷综合| 狠狠色丁香久久婷婷综|