Writes an initialization nibble to the LCD. This particular function is only used during initialization.
(self, nibble)
| 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.""" |