本文整理汇总了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);
}
示例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();
}
示例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()) {
示例4: digitalWrite
void LiquidCrystal::write4bits(uint8 value) {
for (int i = 0; i < 4; i++) {
digitalWrite(_data_pins[i], (value >> i) & 0x01);
}
pulseEnable();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}