MCPcopy Index your code
hub / github.com/RetiredWizard/PyDOS / __init__

Method __init__

cpython/lib/lcd_api.py:50–66  ·  view source on GitHub ↗
(self, num_lines, num_columns)

Source from the content-addressed store, hash-verified

48 LCD_RW_READ = 1
49
50 def __init__(self, num_lines, num_columns):
51 self.num_lines = num_lines
52 if self.num_lines > 4:
53 self.num_lines = 4
54 self.num_columns = num_columns
55 if self.num_columns > 40:
56 self.num_columns = 40
57 self.cursor_x = 0
58 self.cursor_y = 0
59 self.implied_newline = False
60 self.backlight = True
61 self.display_off()
62 self.backlight_on()
63 self.clear()
64 self.hal_write_command(self.LCD_ENTRY_MODE | self.LCD_ENTRY_INC)
65 self.hide_cursor()
66 self.display_on()
67
68 def clear(self):
69 """Clears the LCD display and moves the cursor to the top left

Callers

nothing calls this directly

Calls 6

display_offMethod · 0.95
backlight_onMethod · 0.95
clearMethod · 0.95
hal_write_commandMethod · 0.95
hide_cursorMethod · 0.95
display_onMethod · 0.95

Tested by

no test coverage detected