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


C++ pulseEnable函数代码示例

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


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

示例1: lcd_byte

/*
send a byte to the lcd in two nibbles
before calling use SetChrMode or SetCmdMode to determine whether to send character or command
*/
void lcd_byte(mraa_gpio_context *g, char bits)
{
   mraa_gpio_write(g[2],(bits & 0x10)) ; 
   mraa_gpio_write(g[3],(bits & 0x20)) ; 
   mraa_gpio_write(g[4],(bits & 0x40)) ; 
   mraa_gpio_write(g[5],(bits & 0x80)) ; 
   pulseEnable(g);

   mraa_gpio_write(g[2],(bits & 0x1)) ; 
   mraa_gpio_write(g[3],(bits & 0x2)) ; 
   mraa_gpio_write(g[4],(bits & 0x4)) ; 
   mraa_gpio_write(g[5],(bits & 0x8)) ; 
   pulseEnable(g);         
}
开发者ID:abyman,项目名称:garage,代码行数:18,代码来源:lcd.c

示例2: lcd_byte

/*
send a byte to the lcd in two nibbles
before calling use SetChrMode or SetCmdMode to determine whether to send character or command
*/
void lcd_byte(char bits)
{
	digitalWrite (LCD_D4,(bits & 0x10)); 
	digitalWrite (LCD_D5,(bits & 0x20)); 
	digitalWrite (LCD_D6,(bits & 0x40)); 
	digitalWrite (LCD_D7,(bits & 0x80)); 
	pulseEnable();

	digitalWrite (LCD_D4,(bits & 0x1)); 
	digitalWrite (LCD_D5,(bits & 0x2)); 
	digitalWrite (LCD_D6,(bits & 0x4)); 
	digitalWrite (LCD_D7,(bits & 0x8)); 
	pulseEnable();         
}
开发者ID:clementsoullard,项目名称:background-scheduler-service,代码行数:18,代码来源:lcd.c

示例3: SET

// write either command or data, with automatic 4/8-bit selection
void LiquidCrystal::send(unsigned char value, bool mode) {
    if (this->realTimeDisplay) {
        if (mode) {
            SET(_rs_pin);
        } else {
            RESET(_rs_pin);
        }

        write4bits(value >> 4);
        pulseEnable(1);
        write4bits(value);
        pulseEnable(delayAfterCommand);
    } else {
        if (!lcdActions.isFull()) {
开发者ID:norbim1,项目名称:preenFM2,代码行数:15,代码来源:LiquidCrystal.cpp

示例4: digitalWrite

void LiquidCrystal::write4bits(uint8 value) {
  for (int i = 0; i < 4; i++) {
    digitalWrite(_data_pins[i], (value >> i) & 0x01);
  }

  pulseEnable();
}
开发者ID:afranceschi,项目名称:SDR,代码行数:7,代码来源:LiquidCrystal.cpp

示例5: pinMode

void LiquidCrystal::write8bits(uint8_t value) {
	for (int i = 0; i < 8; i++) {
		pinMode(_data_pins[i], OUTPUT);
		digitalWrite(_data_pins[i], (value >> i) & 0x01);
	}
	pulseEnable();
}
开发者ID:pesilajo,项目名称:mystepcschas,代码行数:7,代码来源:LiquidCrystal.cpp

示例6: pulseEnable

void LiquidCrystal::write4bits(uint8_t value) {
  IO::digitalWrite(LCD_D0_PIN, value & 1);
  IO::digitalWrite(LCD_D1_PIN, value & 2);
  IO::digitalWrite(LCD_D2_PIN, value & 4);
  IO::digitalWrite(LCD_D3_PIN, value & 8);
  pulseEnable();
}
开发者ID:9DSmart,项目名称:cheali-charger,代码行数:7,代码来源:LiquidCrystal.cpp

示例7: digitalWrite

void LiquidCrystal_EADIP204_6::write8bits(uint8_t value) {
    for (int i = 0; i < 8; i++) {
        digitalWrite(_data_pins[i], (value >> i) & 0x01);
    }

    pulseEnable();
}
开发者ID:jucs,项目名称:arduino-due,代码行数:7,代码来源:LiquidCrystal_EADIP204_6.cpp

示例8: pinMode

void OLEDFourBit::write4bits(uint8_t value) {
	for (int i = 0; i < 4; i++) {
		pinMode(_data_pins[i], OUTPUT);
		digitalWrite(_data_pins[i], (value >> i) & 0x01);
	}
	delayMicroseconds(100);
	pulseEnable();
}
开发者ID:djimoun,项目名称:SabreCE,代码行数:8,代码来源:OLEDFourBit.cpp

示例9: pinMode

void LCmini::write4bits(uint8_t value) {
  for (int i = 0; i < 4; i++) {
    pinMode(_data_pins[i], OUTPUT);
    digitalWrite(_data_pins[i], (value >> i) & 0x01);
  }

  pulseEnable();
}
开发者ID:kphannan,项目名称:OpenLCB,代码行数:8,代码来源:LCmini.cpp

示例10: setDataMode

// write either command or data, with automatic 4/8-bit selection
void LiquidCrystalNew_SSPI::send(uint8_t value, byte mode) {
	byte en = _en1;
	if (_multipleChip && getChip()) en = _en2;
	//delayMicroseconds(DELAYPERCHAR);
	setDataMode(mode);					// I2C & SPI
		bitWrite(_theData,LCDPIN_D4,value & 0x10);
		bitWrite(_theData,LCDPIN_D5,value & 0x20);
		bitWrite(_theData,LCDPIN_D6,value & 0x40);
		bitWrite(_theData,LCDPIN_D7,value & 0x80);
		pulseEnable(en);
		bitWrite(_theData,LCDPIN_D4,value & 0x01);
		bitWrite(_theData,LCDPIN_D5,value & 0x02);
		bitWrite(_theData,LCDPIN_D6,value & 0x04);
		bitWrite(_theData,LCDPIN_D7,value & 0x08);

		bitWrite(_theData,LCDPIN_LD,_backLight);//Background led
	pulseEnable(en);
	}
开发者ID:sumotoy,项目名称:LiquidCrystalNewV2,代码行数:19,代码来源:LiquidCrystalNew_SSPI.cpp

示例11: pinMode

inline void LCD_Low_Level::write8bits(uint8_t data) {

  for (uint8_t i = 0; i < 8; i++) {
    pinMode(_data_pins[i], OUTPUT);
    digitalWrite(_data_pins[i], (data >> i) & 0x01);
  }
	
	pulseEnable();
}
开发者ID:EvanBuelt,项目名称:Arduino-Projects,代码行数:9,代码来源:LCD_Low_Level.cpp

示例12: pulseEnable

void PortDLCD::write4bits(uint8_t value) {
//   for (int i = 0; i < 4; i++) {
//     
//     digitalWrite(_data_pins[i], (value >> i) & 0x01);
//   }
// 
	PORTD = (PORTD & 0b11110000) | (value & 0b00001111);

  pulseEnable();
}
开发者ID:vaddieg,项目名称:arduino,代码行数:10,代码来源:PortDLCD.cpp

示例13: writeBits

static void writeBits(uint8_t value, uint8_t nbits) {
    set_output(1);

    int i;
    for(i = 0; i < nbits; i++) {
		GPIO_WriteBit(Lcd_Conf.gpio, Lcd_Conf.data[i], (value >> i) & 0x01);
    }

    pulseEnable();
}
开发者ID:AtomicAntimatter,项目名称:STM32F4_LCD,代码行数:10,代码来源:LCD.c

示例14: setDataMode

// write either command or data, with automatic 4/8-bit selection
void LiquidCrystalNew_T3TWI::send(uint8_t value, byte mode) {
	byte en = _en1;
	if (_multipleChip){
		if (getChip()) en = _en2;
	}	
	setDataMode(mode);					// I2C & SPI
		bitWrite(_theData,LCDPIN_D4,value & 0x10);
		bitWrite(_theData,LCDPIN_D5,value & 0x20);
		bitWrite(_theData,LCDPIN_D6,value & 0x40);
		bitWrite(_theData,LCDPIN_D7,value & 0x80);
		pulseEnable(en);
		bitWrite(_theData,LCDPIN_D4,value & 0x01);
		bitWrite(_theData,LCDPIN_D5,value & 0x02);
		bitWrite(_theData,LCDPIN_D6,value & 0x04);
		bitWrite(_theData,LCDPIN_D7,value & 0x08);

		bitWrite(_theData,LCDPIN_LD,_backLight);//Background led
	pulseEnable(en);
}
开发者ID:sumotoy,项目名称:LiquidCrystalNewV2,代码行数:20,代码来源:LiquidCrystalNew_T3TWI.cpp

示例15: bitWrite

void LiquidCrystalNew_SSPI::write4bits(byte value) {  //still used during init
	register byte v = value;
	byte en = _en1;
 // 4x40 LCD with 2 controller chips with separate enable lines if we called w 2 enable pins and are on lines 2 or 3 enable chip 2  
	if (_multipleChip && getChip()) en = _en2;   
		bitWrite(_theData,LCDPIN_D4,v & 01);
		bitWrite(_theData,LCDPIN_D5,(v >>= 1) & 01);
		bitWrite(_theData,LCDPIN_D6,(v >>= 1) & 01);
		bitWrite(_theData,LCDPIN_D7,(v >>= 1) & 01);
	pulseEnable(en);
} 
开发者ID:sumotoy,项目名称:LiquidCrystalNewV2,代码行数:11,代码来源:LiquidCrystalNew_SSPI.cpp


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