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

C++ Nop函数代码示例

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

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



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

示例1: LCD_i_write

 void LCD_i_write(BYTE v)
 {
     LCDWritePortA(0);
     DelayMs(1);
     LCDWritePortB(v);
     Nop();
     Nop();
     Nop();
     Nop();
     LCDWritePortA(0x40);
     Nop();
     Nop();
     Nop();
     Nop();
     Nop();
     Nop();
     LCDWritePortA(0x00);
     return;
 }
开发者ID:Athuli7,项目名称:Microchip,代码行数:19,代码来源:LCDBlocking.c


示例2: wait

void wait(unsigned int count)
{
    /* count of 1 is approx 10.5us */
    volatile unsigned int x;
    
    for(x = 0; x < count; x++)
    {
        Nop();
    }    
}    
开发者ID:codinghead,项目名称:hd44780-module,代码行数:10,代码来源:lcdifTestAnagVision8-bit.c


示例3: LCD_i_write

void LCD_i_write(uint8_t v)
{
    LCDWritePortA(0);
    DELAY_ms(1);
    LCDWritePortB(v);
    Nop();
    Nop();
    Nop();
    Nop();
    LCDWritePortA(0x40);
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    LCDWritePortA(0x00);
    return;
}
开发者ID:kerikun11,项目名称:MPLABXProjects,代码行数:19,代码来源:lcd.c


示例4: LCD_d_write

void LCD_d_write(uint8_t v)
{
    DELAY_ms(1);
    LCDWritePortA(0x80);
    LCDWritePortB(v);
    Nop();
    Nop();
    Nop();
    Nop();
    LCDWritePortA(0xC0);
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    LCDWritePortA(0);

} 
开发者ID:kerikun11,项目名称:MPLABXProjects,代码行数:19,代码来源:lcd.c


示例5: RestartI2C

/*********************************************************************
* Function:        RestartI2C()
* Overview:		Generates a restart condition and optionally returns status
********************************************************************/
unsigned int RestartI2C(void)
{
	//This function generates an I2C Restart condition and returns status 
	//of the Restart.

	I2C1CONbits.RSEN = 1;		//Generate Restart		
	Nop();
	while (I2C1CONbits.RSEN);	//Wait for restart	
	//return(I2C1STATbits.S);	//Optional - return status
}
开发者ID:aeickho,项目名称:pix32_uart_demo,代码行数:14,代码来源:i2c.c


示例6: StopI2C

/*********************************************************************
* Function:        StopI2C()
* Overview:		Generates a bus stop condition
********************************************************************/
unsigned int StopI2C(void)
{
	//This function generates an I2C stop condition and returns status 
	//of the Stop.

	I2C1CONbits.PEN = 1;		//Generate Stop Condition
	Nop();
	while (I2C1CONbits.PEN);	//Wait for Stop
	//return(I2C1STATbits.P);	//Optional - return status
}
开发者ID:aeickho,项目名称:pix32_uart_demo,代码行数:14,代码来源:i2c.c


示例7: LCD_d_write

 void LCD_d_write(BYTE v)
 {
     DelayMs(1);
     LCDWritePortA(0x80);
     LCDWritePortB(v);
     Nop();
     Nop();
     Nop();
     Nop();
     LCDWritePortA(0xC0);
     Nop();
     Nop();
     Nop();
     Nop();
     Nop();
     Nop();
     LCDWritePortA(0);
     
 } 
开发者ID:Athuli7,项目名称:Microchip,代码行数:19,代码来源:LCDBlocking.c


示例8: StartI2C

unsigned int StartI2C(void)
{
	//This function generates an I2C start condition and returns status 
	//of the Start.

	I2C1CONbits.SEN = 1;		//Generate Start Condition
	Nop();
	while (I2C1CONbits.SEN);	//Wait for Start Condition
	//return(I2C1STATbits.S);	//Optionally return status
}
开发者ID:aeickho,项目名称:pix32_uart_demo,代码行数:10,代码来源:i2c.c


示例9: fpga_0clear

void fpga_0clear(void)
{
//	while(BUSY!=0){}
	SLC=memory0set;
	SLT=0;
    SLT=1;
	Nop();
	SLT=0;

}
开发者ID:hirakuni45,项目名称:test,代码行数:10,代码来源:ck4_fpga.c


示例10: i2c_Start

void i2c_Start(char addr, char rw){
    I2C2CONbits.ACKDT = 0;
    int i=0;
    for(i=0;i<1000;i++)
        Nop();
    I2C2CONbits.SEN = 1;
    while(I2C2CONbits.SEN){};
    i2c_Write(addr | rw);

}
开发者ID:Corey255A1,项目名称:Senior-Design,代码行数:10,代码来源:i2c.c


示例11: adxl345_get_xyz

void adxl345_get_xyz(PACC_XYZ adxl345) {
    ACC_CS = 0;
    SD_CS = 1;
    Nop();
    Nop();
    Nop();

    SPI_INTERRUPT_FLAG = 0;
    SPIBUF = 0xF2; // do a multiread of all 6 bytes (0b11[0x32: DATAX0])
    while (!SPI_INTERRUPT_FLAG);

    SPI_INTERRUPT_FLAG = 0;
    SPIBUF = 0x00;
    while (!SPI_INTERRUPT_FLAG);

    SPI_INTERRUPT_FLAG = 0;
    SPIBUF = 0x00;
    while (!SPI_INTERRUPT_FLAG);
    adxl345->x = SPIBUF;
    adxl345->x ^= 0x80;

    SPI_INTERRUPT_FLAG = 0;
    SPIBUF = 0x00;
    while (!SPI_INTERRUPT_FLAG);

    SPI_INTERRUPT_FLAG = 0;
    SPIBUF = 0x00;
    while (!SPI_INTERRUPT_FLAG);
    adxl345->y = SPIBUF;
    adxl345->y ^= 0x80;

    SPI_INTERRUPT_FLAG = 0;
    SPIBUF = 0x00;
    while (!SPI_INTERRUPT_FLAG);

    SPI_INTERRUPT_FLAG = 0;
    SPIBUF = 0x00;
    while (!SPI_INTERRUPT_FLAG);
    adxl345->z = SPIBUF;
    adxl345->z ^= 0x80;

    ACC_CS = 1;
}
开发者ID:kristofvl,项目名称:HedgeHog,代码行数:43,代码来源:ADXL345.c


示例12: K9F1208_Wdata

void K9F1208_Wdata(unsigned char data)//写数据
{
	K9F_Odata;//输出
	K9F_CLE=0;
	K9F_ALE=0;
	K9F_WE=0;
	K9F_O_data=data;
	Nop();
	K9F_WE=1;
}	
开发者ID:c77180,项目名称:Git_First,代码行数:10,代码来源:flash.c


示例13: GetCommand

/********************************************************************
* Function: 	void GetCommand()
*
* Precondition: UART Setup
*
* Input: 		None.
*
* Output:		None.
*
* Side Effects:	None.
*
* Overview: 	Polls the UART to recieve a complete AN851 command.
*			 	Fills buffer[1024] with recieved data.
*
* Note:		 	None.
********************************************************************/
void GetCommand()
{
	BYTE RXByte;
	BYTE checksum;
	WORD dataCount;

	while(1){

		#ifndef USE_AUTOBAUD
        GetChar(&RXByte);                                                           //Get first STX
        if(RXByte == STX){
        #else
        AutoBaud();                                                                 //Get first STX and calculate baud rate
		RXByte = UxRXREG;                                                           //Dummy read
        #endif

		T2CONbits.TON = 0;                                                          //Disable timer - data received

		GetChar(&RXByte);                                                           //Read second byte
		if(RXByte == STX){                                                          //2 STX, beginning of data

			checksum = 0;                                                           //Reset checksum
			dataCount = 0;                                                          //Reset datacount

			while(dataCount <= MAX_PACKET_SIZE+1){                                  //Maximum num bytes to receive
				GetChar(&RXByte);
				switch(RXByte){
					case STX:                                                       //Start over if STX
						checksum = 0;
						dataCount = 0;
						break;

					case ETX:                                                       //End of packet if ETX
						checksum = ~checksum +1;                                    //Test checksum
						Nop();
						if(checksum == 0) return;                                   //Return if OK
						dataCount = 0xFFFF;                                         //Otherwise restart
						break;

					case DLE:                                                       //If DLE, treat next as data
						GetChar(&RXByte);
					default:                                                        //Get data, put in buffer
						checksum += RXByte;
						buffer[dataCount++] = RXByte;
						break;

				}                                                                   //End switch(RXByte)
			}                                                                       //End while(byteCount <= 1024)
		}                                                                           //End if(RXByte == STX)

        #ifndef USE_AUTOBAUD
        }                                                                           //End if(RXByte == STX)
        #endif
	}                                                                               //End while(1)
}                                                                                   //End GetCommand()
开发者ID:krekeltronics,项目名称:pic24-bootloader-firmware,代码行数:71,代码来源:BootLoader.c


示例14: GetTickCopy

/*****************************************************************************
  Function:
	static void GetTickCopy(void)

  Summary:
	Reads the tick value.

  Description:
	This function performs an interrupt-safe and synchronized read of the 
	48-bit Tick value.

  Precondition:
	None

  Parameters:
	None

  Returns:
  	None
  ***************************************************************************/
static void GetTickCopy(void)
{
	// Perform an Interrupt safe and synchronized read of the 48-bit 
	// tick value
#if defined(__18CXX) || defined (__SDCC__)
	do
	{
           INTCONbits.TMR0IE = 1;		// Enable interrupt
           Nop();
	   INTCONbits.TMR0IE = 0;		// Disable interrupt
	   vTickReading[0] = TMR0L;
	   vTickReading[1] = TMR0H;
	   *((DWORD*)&vTickReading[2]) = dwInternalTicks;
	} while(INTCONbits.TMR0IF);
	INTCONbits.TMR0IE = 1;			// Enable interrupt
#else
	do
	{
		DWORD dwTempTicks;
		
		IEC0bits.T1IE = 1;			// Enable interrupt
		Nop();
		IEC0bits.T1IE = 0;			// Disable interrupt
		
		// Get low 2 bytes
		((WORD*)vTickReading)[0] = TMR1;
		
		// Correct corner case where interrupt increments byte[4+] but 
		// TMR1 hasn't rolled over to 0x0000 yet
		dwTempTicks = dwInternalTicks;
		if(((WORD*)vTickReading)[0] == 0xFFFFu)
			dwTempTicks--;
		
		// Get high 4 bytes
		vTickReading[2] = ((BYTE*)&dwTempTicks)[0];
		vTickReading[3] = ((BYTE*)&dwTempTicks)[1];
		vTickReading[4] = ((BYTE*)&dwTempTicks)[2];
		vTickReading[5] = ((BYTE*)&dwTempTicks)[3];
	} while(IFS0bits.T1IF);
	IEC0bits.T1IE = 1;				// Enable interrupt
#endif
}
开发者ID:FalcoBolger,项目名称:SORTES-DHCP,代码行数:62,代码来源:Tick.c


示例15: r_cv_read

Uint8 r_cv_read(){
    R_CV_Tris = 1;
    Nop();
    if(R_CV_Read){
        delayus(100);
        if(R_CV_Read){
            return true;
        }
    }
    return false;
}
开发者ID:bingjinyeah,项目名称:prjt,代码行数:11,代码来源:port.c


示例16: spi_sck_pulse

void spi_sck_pulse(void)
{
	RPOR4bits.RP8R=0;// remove SPI CLK from pin
	SPICLK=0; // SCK low
	_delay_ms(0.10);
	SPICLK=1; // SCK high
	_delay_ms(0.10);
	SPICLK=0; // SCK low
	RPOR4bits.RP8R=SCK1OUT_IO; 	//reassign SPI CLK
	Nop();
}
开发者ID:kaaLabs15,项目名称:dangerous-prototypes-open-hardware,代码行数:11,代码来源:spi.c


示例17: osd_spi_write

void osd_spi_write(char addr, char byte)
{
    OSD_CS = 1 ;				// Make sure we start with active-low CS high
    OSD_SCK = 0 ;				// and CK low

    OSD_CS = 0 ;				// Set active-low CS low to start the SPI cycle
    spi_write_raw_byte(addr) ;	// Send the Address
    spi_write_raw_byte(byte) ;	// Send the data

    OSD_CS = 1 ;				// Set active-low CS high to end the SPI cycle

    Nop();
    Nop();
    Nop();
    Nop();	// Kill some time with CS high to make a more solid pulse

    OSD_MOSI = 0 ;

    return ;
}
开发者ID:gaubuali,项目名称:propilot,代码行数:20,代码来源:osd.c


示例18: vSST25ResetWriteProtection

// *------------------------------------------------------*
void vSST25ResetWriteProtection(void){
	
    SST25_CS=0;
    vSPIPut(SST25_CMD_EWSR);
    SST25_CS=1;
	Nop();
    SST25_CS=0;
    vSPIPut(SST25_CMD_WRSR);
    vSPIPut(0x00);
    SST25_CS=1;
}
开发者ID:AleSuky,项目名称:SkP32v1.1,代码行数:12,代码来源:SST25VF016.c


示例19: DelayCount

void DelayCount(void)
{
    unsigned short Delay;
    Delay = 0x8000;

    while (Delay>0)
    {
        Delay--;
        Nop();
    }
}
开发者ID:calamaro,项目名称:pi-changer,代码行数:11,代码来源:LEDTest.c


示例20: l_cl_read

Uint8 l_cl_read(){
    L_CL_Tris = 1;
    Nop();
    if(L_CL_Read==0){
        delayus(100);
        if(L_CL_Read==0){
            return true;
        }
    }
    return false;
}
开发者ID:bingjinyeah,项目名称:prjt,代码行数:11,代码来源:port.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ Normal函数代码示例发布时间:2022-05-30
下一篇:
C++ None函数代码示例发布时间: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