Moves the cursor position to the indicated position. The cursor position is zero based (i.e. cursor_x == 0 indicates first column).
(self, cursor_x, cursor_y)
| 120 | self.hal_backlight_off() |
| 121 | |
| 122 | def move_to(self, cursor_x, cursor_y): |
| 123 | """Moves the cursor position to the indicated position. The cursor |
| 124 | position is zero based (i.e. cursor_x == 0 indicates first column). |
| 125 | """ |
| 126 | self.cursor_x = cursor_x |
| 127 | self.cursor_y = cursor_y |
| 128 | addr = cursor_x & 0x3f |
| 129 | if cursor_y & 1: |
| 130 | addr += 0x40 # Lines 1 & 3 add 0x40 |
| 131 | if cursor_y & 2: # Lines 2 & 3 add number of columns |
| 132 | addr += self.num_columns |
| 133 | self.hal_write_command(self.LCD_DDRAM | addr) |
| 134 | |
| 135 | def putchar(self, char): |
| 136 | """Writes the indicated character to the LCD at the current cursor |
no test coverage detected