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

C++ pulseEnable函数代码示例

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

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



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


示例16: pcf8574WriteData4

// 写四位数据
EXPORT int pcf8574WriteData4(int devFD, unsigned char data)
{
    clearLastError();
    if (I2CWriteByte(devFD, (data | RS | BL), 0) == -1) {
        return -1;
    }
    if (pulseEnable(devFD, (data | RS | BL)) == -1) {
        return -1;
    }
    return 0;
}
开发者ID:DEM-DWG,项目名称:matrix,代码行数:12,代码来源:pcf8574.c


示例17: bitWrite

void LiquidCrystalNew_T3TWI::write4bits(byte value) {  //still used during init
	register byte v = value;
	byte en = _en1;
	if (_multipleChip){
		if (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,代码行数:12,代码来源:LiquidCrystalNew_T3TWI.cpp


示例18: pcf8574WriteCmd4

// 写四位指令
EXPORT int pcf8574WriteCmd4(int devFD, unsigned char command)
{
    clearLastError();
    if (I2CWriteByte(devFD, command | BL, 0) == -1) {
        return -1;
    }
    if (pulseEnable(devFD, command | BL) == -1) {
        setLastError("Fail to pulseEnable");
        return -1;
    }
    return 0;
}
开发者ID:DEM-DWG,项目名称:matrix,代码行数:13,代码来源:pcf8574.c


示例19: pinMode

void PCFCrystal::write8bits(uint8_t value) {
  for (int i = 0; i < 8; i++) {
/*
  // ORIGINAL CODE
    pinMode(_data_pins[i], OUTPUT);
    digitalWrite(_data_pins[i], (value >> i) & 0x01);
*/
    setBit(_data, _data_pins[i], (value >> i) & 0x01);    
  }
  
  pulseEnable();
}
开发者ID:Nm8574,项目名称:Ardugo,代码行数:12,代码来源:PCFCrystal.cpp


示例20: write4bits

static upm_result_t write4bits(const lcm1602_context dev,
                               uint8_t value)
{
    assert(dev != NULL);

    upm_result_t rv = UPM_SUCCESS;

    if (dev->isI2C)
    {
        if (expandWrite(dev, value))
            rv = UPM_ERROR_OPERATION_FAILED;
        if (pulseEnable(dev, value))
            rv = UPM_ERROR_OPERATION_FAILED;

        return rv;
    }

    // else gpio
    mraa_result_t mrv = MRAA_SUCCESS;
    mrv = mraa_gpio_write(dev->gpioD0, ((value >> 0) & 0x01) );
    mrv = mraa_gpio_write(dev->gpioD1, ((value >> 1) & 0x01) );
    mrv = mraa_gpio_write(dev->gpioD2, ((value >> 2) & 0x01) );
    mrv = mraa_gpio_write(dev->gpioD3, ((value >> 3) & 0x01) );

    if (mrv)
    {
        printf("%s: mraa_gpio_write() failed\n", __FUNCTION__);
        rv = UPM_ERROR_OPERATION_FAILED;
    }

    if (pulseEnable(dev, value)) // value is ignored here for gpio
    {
        printf("%s: pulseEnable() failed\n", __FUNCTION__);
        rv = UPM_ERROR_OPERATION_FAILED;
    }

    return rv;
}
开发者ID:chihchun,项目名称:upm,代码行数:38,代码来源:lcm1602.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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