MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / hal_write_init_nibble

Method hal_write_init_nibble

cpython/lib/circuitpython_i2c_lcd.py:43–50  ·  view source on GitHub ↗

Writes an initialization nibble to the LCD. This particular function is only used during initialization.

(self, nibble)

Source from the content-addressed store, hash-verified

41 self.hal_write_command(cmd)
42
43 def hal_write_init_nibble(self, nibble):
44 """Writes an initialization nibble to the LCD.
45
46 This particular function is only used during initialization.
47 """
48 byte = ((nibble >> 4) & 0x0f) << SHIFT_DATA
49 self.i2c.writeto(self.i2c_addr, bytearray([byte | MASK_E]))
50 self.i2c.writeto(self.i2c_addr, bytearray([byte]))
51
52 def hal_backlight_on(self):
53 """Allows the hal layer to turn the backlight on."""

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected