您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DelayMs函数代码示例

51自学网 2021-06-01 20:26:25
  C++
这篇教程C++ DelayMs函数代码示例写得很实用,希望能帮到您。

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

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

示例1: timer0_ISR

void timer0_ISR(void){	DelayMs(100);	cont--;	D8Led_symbol(numbers[cont]);	if (cont == 0) {		rINTMSK = rINTMSK | BIT_TIMER0; //disable timer0		rI_ISPC = BIT_TIMER0;		//key = -1;		//DelayMs(200);		//rINTMSK = rINTMSK & ~(BIT_TIMER4); //enable timer4		rINTMSK = rINTMSK & ~(BIT_TIMER1); //enable timer1	}	rI_ISPC = BIT_TIMER0;}
开发者ID:huig-,项目名称:SED,代码行数:15,


示例2: iic_putByte_stop

void iic_putByte_stop(uint8 byte) {	// Escribe el dato	IICDS = byte;	// Comienza la trasmisión del dato (borrando pending bit del IICCON)	IICCON &= ~(1 << 4);	// Espera la recepción de ACK	while (!(IICCON & 0x10)); //while (IICSTAT & 0x1);	// Máster Tx, stop condition, Tx/Rx habilitada	IICSTAT = (IICSTAT & 0x0F) | 0xD0;	// Comienza la trasmisión de STOP (borrando pending bit del IICCON)	IICCON &= ~(1 << 4);	// Espera a que la stop condition tenga efecto (5 ms para la at24c04)	DelayMs(5);}
开发者ID:RotaruDan,项目名称:DESgame,代码行数:15,


示例3: write_code_P18F67KXX

void write_code_P18F67KXX( unsigned long address, unsigned char* data, char blocksize, char lastblock ){	char blockcounter;	//FIXME: this only needs to be done on FIRST_BLOCK	if( (address & 0x60) == 0 ) //package must be 128 bytes, so only do this every four packages.	{		pic_send( 4, 0x00, 0x8E7F ); //BSF EECON1, EEPGD		pic_send( 4, 0x00, 0x9C7F ); //BSF EECON1, CFGS		pic_send( 4, 0x00, 0x847F ); //BSF EECON1, WREN		set_address_P18( address );	}	for( blockcounter = 0; blockcounter < (blocksize - 2); blockcounter += 2 )	{		//write 2 bytes and post increment by 2		//				MSB				LSB		pic_send( 4, 0x0D, ((unsigned int) *(data + blockcounter))				| (((unsigned int) *(data + 1 + blockcounter)) << 8) );	}	if( (address & 0x60) == 0x60 || (lastblock & BLOCKTYPE_LAST) )	{		//write last 2 bytes of the block and start programming		pic_send( 4, 0x0F, ((unsigned int) *(data + blockcounter))				| (((unsigned int) *(data + 1 + blockcounter)) << 8) );		pic_send_n_bits( 3, 0 );		PGChigh(); //hold PGC high for P9 and low for P10		DelayMs( P9 );		PGClow();		DelayMs( P10 );		pic_send_word( 0x0000 );	}	else		pic_send( 4, 0x0D, ((unsigned int) *(data + blockcounter))				| (((unsigned int) *(data + 1 + blockcounter)) << 8) );}
开发者ID:LestherSK,项目名称:usbpicprog,代码行数:36,


示例4: ServerDrv_CheckDataSent

int32_t ServerDrv_CheckDataSent(uint8_t sock){    uint16_t timeout = 0;    uint8_t _data    = 0;    uint8_t _dataLen = 0;    const uint16_t TIMEOUT_DATA_SENT = 25;    do    {        //WAIT_FOR_SLAVE_SELECT();        SpiDrv_WaitForSlaveReady();        SpiDrv_SlaveSelect();        // Send Command        SpiDrv_SendCmd(DATA_SENT_TCP_CMD, PARAM_NUMS_1);        SpiDrv_SendParam(&sock, sizeof(sock), LAST_PARAM);        //Wait the reply elaboration        SpiDrv_WaitForSlaveReady();        // Wait for reply        if (!SpiDrv_WaitResponseCmd(DATA_SENT_TCP_CMD, PARAM_NUMS_1, &_data, &_dataLen))        {            //WARN("error waitResponse isDataSent");        }        SpiDrv_SlaveDeselect();        if (_data)        {            timeout = 0;        }        else        {            ++timeout;            DelayMs(100);        }    }while((_data==0)&&(timeout<TIMEOUT_DATA_SENT));    if(timeout==TIMEOUT_DATA_SENT)    {        return (0);    }    else    {        return (1);    }}
开发者ID:cedar-renjun,项目名称:Arduino_WiFi_Shield,代码行数:48,


示例5: SetupMenu

void SetupMenu() // Set up menu{	uint8 i;	while(1)	{	  i = GetMenuItem("TERMINAL SETUP","WiFi Setup","ESPUSB Fudge","Scan WiFi","Test Wifi","Exit");  	if(i==1) SetupWIFI();		if(i==2) // Open USB in CDC Mode passthough to ESP-01    {      SerialPurge(WIFI_UART);      CLS();      LCDWriteStrAt(0,4, "  USB <-> ESP01 ");      LCDWriteStrAt(0,6, "   PROGRAMMIING   ");      LCDWriteStrAt(0,10,"  PRESS KEY TO ");      LCDWriteStrAt(0,12,"    CONTINUE    ");            PORTSetPinsDigitalIn(IOPORT_C,  BIT_2 );      PPSUnLock;					// Unlock PPS (Peripheral Pin Select) to allow PIN Mapping      PPSOutput(4,RPC2,NULL);       PPSLock;						// lock PPS      ESP_PGM(0);      WIFI_PWR(1);      i = WaitEvent(9999);      CLS();      WIFI_PWR(0);      ESP_PGM(1);  		DelayMs(500);      WIFI_PWR(1);      LCDWriteStrAt(0,4, "  USB <-> ESP01 ");      LCDWriteStrAt(0,6, "   PASSTHROUGH   ");      LCDWriteStrAt(0,10,"  POWER OFF TO ");      LCDWriteStrAt(0,12,"     RESUME     ");      while(1);    }		if(i==4)     {		      if(CheckWIFI()) LCDInform("SUCCESS","Connection OK");    }		if(i==3) {	LCDInform("WARNING","Not Implemented");	}		if(i==0 ||i==5) return;	}}
开发者ID:Rodyne,项目名称:Data-Collection-Terminal,代码行数:48,


示例6: MODEM_Wait

// wait for reponse from modem within specific time out// maximum waiting period = (time / 10) secondsuint8_t MODEM_Wait(const uint8_t *res, uint32_t time){	uint8_t c, i=0;	time *= 100;	while(time--){		DelayMs(1);		while(RINGBUF_Get(&commBuf, &c)==0){			if(c==res[i]){				if(res[++i]==0)return 1;			}else if(c==res[0]) i = 1;			else i = 0;		}	}		return 0;}
开发者ID:PascalSI,项目名称:ampm_car_tracker,代码行数:18,


示例7: KEY_Scan

/*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ** 函数名称: KEY_Scan ** 功能描述: 按键扫描程序			 ** 参数描述:KEY_Status标志位 返回的值分别对应按键值 ** 作   者: Dream ** 日   期: 2011年6月20日 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/uint8_t KEY_Scan(void){    static uint8_t KEY_Status =1; //定义一个按键标志位    if(KEY_Status&&(KEY_USER==0||KEY_S==0||KEY_D==0||KEY_L==0||KEY_R==0||KEY_U==0))//判断是否有按键按下    {        DelayMs(10);//去抖动         KEY_Status =0;        if(KEY_USER==0) return 1;	  //按键USER按下返回1        else if(KEY_S==0) return 2;	  //按键JOY-SEN按下返回1        else if(KEY_D==0) return 3;	  //按键JOY-DOWN按下返回1        else if(KEY_L==0) return 4;	  //按键JOY-LEFT按下返回1        else if(KEY_R==0) return 5;	  //按键JOY-RIGHT按下返回1        else if(KEY_U==0) return 6;	  //按键JOY-DOWN按下返回1    }else if(KEY_USER==1&&KEY_S==1&&KEY_D==1&&KEY_L==1&&KEY_R==1&&KEY_U==1)KEY_Status=1;    return 0;						  //无按键按下返回0}
开发者ID:dodocat,项目名称:nebular,代码行数:24,


示例8: TouchGetCalPoints

/********************************************************************** Function: void TouchGetCalPoints(WORD* ax, WORD* ay)** PreCondition: InitGraph() must be called before** Input: ax - pointer to array receiving 3 X touch positions*        ay - pointer to array receiving 3 Y touch positions** Output: none** Side Effects: none** Overview: gets values for 3 touches** Note: none*********************************************************************/void TouchGetCalPoints(WORD* ax, WORD* ay){static const XCHAR calStr[] = {'C','A','L','I','B','R','A','T','I','O','N',0};XCHAR calTouchLeft[] = {'3',' ','t','o','u','c','h','e','s',' ','l','e','f','t',0};SHORT counter;SHORT x,y;    SetFont((void*)&GOLFontDefault);    SetColor(BRIGHTRED);    OutTextXY((GetMaxX()-GetTextWidth((XCHAR*)calStr,(void*)&GOLFontDefault))>>1,              (GetMaxY()-GetTextHeight((void*)&GOLFontDefault))>>1,              (XCHAR*)calStr);    for(counter=0; counter<3; counter++){        SetColor(BRIGHTRED);        calTouchLeft[0] = '3' - counter;        OutTextXY((GetMaxX()-GetTextWidth(calTouchLeft,(void*)&GOLFontDefault))>>1,                  (GetMaxY()+GetTextHeight((void*)&GOLFontDefault))>>1,                   calTouchLeft);        // Wait for press        do{            x=ADCGetX(); y=ADCGetY();        }while((y==-1)||(x==-1));        Beep();        *(ax+counter) = x; *(ay+counter) = y;             // Wait for release        do{            x=ADCGetX(); y=ADCGetY();        }while((y!=-1)&&(x!=-1));        SetColor(WHITE);        OutTextXY((GetMaxX()-GetTextWidth(calTouchLeft,(void*)&GOLFontDefault))>>1,                  (GetMaxY()+GetTextHeight((void*)&GOLFontDefault))>>1,                   calTouchLeft);        DelayMs(500);    }}
开发者ID:WilliamAvila,项目名称:PIC32MX460F512L_Examples,代码行数:64,


示例9: main

int main(void){    //初始化系统时钟 使用外部50M晶振 PLL倍频到100M    SystemClockSetup(ClockSource_EX50M,CoreClock_100M);    DelayInit();    //初始化LED    LED_Init(LED_PinLookup_CHK60EVB, kNumOfLED);	  //将LED1设置为高电平    LED_Set(kLED1);    while(1)    {   			  //2LED闪烁			  LED_Toggle(kLED1);        LED_Toggle(kLED2);        DelayMs(500);    }}
开发者ID:Jaly314,项目名称:CH-K-Lib,代码行数:17,


示例10: LCDUpdate

/****************************************************************************** * Function:        void LCDUpdate(void) * * PreCondition:    LCDInit() must have been called once * * Input:           LCDText[] * * Output:          None * * Side Effects:    None * * Overview:        Copies the contents of the local LCDText[] array into the  *					LCD's internal display buffer.  Null terminators in  *					LCDText[] terminate the current line, so strings may be  *					printed directly to LCDText[]. * * Note:            None *****************************************************************************/void LCDUpdate(void){	BYTE i, j;	// Go home	LCDWrite(0, 0x02);	DelayMs(2);	// Output first line	for(i = 0; i < 16u; i++)	{		// Erase the rest of the line if a null char is 		// encountered (good for printing strings directly)		if(LCDText[0][i] == 0u)		{			for(j=i; j < 16u; j++)			{				LCDText[0][j] = ' ';			}		}		LCDWrite(1, LCDText[0][i]);		Delay10us(5);	}		// Set the address to the second line	LCDWrite(0, 0xC0);	Delay10us(5);    	// Output second line//	for(i = 16; i < 32u; i++)    for(i = 0; i < 16u; i++)	{		// Erase the rest of the line if a null char is 		// encountered (good for printing strings directly)		if(LCDText[1][i] == 0u)		{			//for(j=i; j < 32u; j++)            for(j=i; j < 16u; j++)			{				LCDText[1][j] = ' ';			}		}		LCDWrite(1, LCDText[1][i]);		Delay10us(5);	}}
开发者ID:mori-br,项目名称:PIC18RADIO,代码行数:64,


示例11: SelfTest

/****************************************************************************  Function:    void SelfTest()  Description:    This routine performs a self test of the hardware.  Precondition:    None  Parameters:    None - None  Returns:    None  Remarks:    None  ***************************************************************************/static void SelfTest(void){    char value = 0;    char* buf[32];    Exosite_Init("microchip","dv102412",IF_WIFI, 1);    // Configure Sensor Serial Port    UARTConfigure(SENSOR_UART, UART_ENABLE_PINS_TX_RX_ONLY);    UARTSetFifoMode(SENSOR_UART, UART_INTERRUPT_ON_TX_NOT_FULL | UART_INTERRUPT_ON_RX_NOT_EMPTY);    UARTSetLineControl(SENSOR_UART, UART_DATA_SIZE_8_BITS | UART_PARITY_NONE | UART_STOP_BITS_1);    UARTSetDataRate(SENSOR_UART, GetPeripheralClock(), 9600);    UARTEnable(SENSOR_UART, UART_ENABLE_FLAGS(UART_PERIPHERAL | UART_RX | UART_TX));    // Verify MRF24WB/G0MA MAC Address    if(AppConfig.MyMACAddr.v[0] == 0x00 && AppConfig.MyMACAddr.v[1] == 0x1E)    {        //********************************************************************        // Prints a label using ESC/P commands to a Brother PT-9800PCN printer        //********************************************************************        // Send ESC/P Commands to setup printer        UARTTxBuffer("/033ia/000/[email
C++ DelayUs函数代码示例
C++ DelayInit函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。