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

Method custom_char

cpython/lib/lcd_api.py:164–174  ·  view source on GitHub ↗

Write a character to one of the 8 CGRAM locations, available as chr(0) through chr(7).

(self, location, charmap)

Source from the content-addressed store, hash-verified

162 self.putchar(char)
163
164 def custom_char(self, location, charmap):
165 """Write a character to one of the 8 CGRAM locations, available
166 as chr(0) through chr(7).
167 """
168 location &= 0x7
169 self.hal_write_command(self.LCD_CGRAM | (location << 3))
170 self.hal_sleep_us(40)
171 for i in range(8):
172 self.hal_write_data(charmap[i])
173 self.hal_sleep_us(40)
174 self.move_to(self.cursor_x, self.cursor_y)
175
176 def hal_backlight_on(self):
177 """Allows the hal layer to turn the backlight on.

Callers 2

lcdPrintFunction · 0.80
lcdScrollFunction · 0.80

Calls 4

hal_write_commandMethod · 0.95
hal_sleep_usMethod · 0.95
hal_write_dataMethod · 0.95
move_toMethod · 0.95

Tested by

no test coverage detected