Lines Matching refs:lcd_data
165 struct pi_lcd_data lcd_data = { variable
175 lcd_data.row_offsets[0] = row0; in _set_row_offsets()
176 lcd_data.row_offsets[1] = row1; in _set_row_offsets()
177 lcd_data.row_offsets[2] = row2; in _set_row_offsets()
178 lcd_data.row_offsets[3] = row3; in _set_row_offsets()
282 if (lcd_data.disp_func & LCD_8BIT_MODE) { in _pi_lcd_data()
320 max_lines = ARRAY_SIZE(lcd_data.row_offsets); in pi_lcd_set_cursor()
324 if (row >= lcd_data.cfg_rows) { in pi_lcd_set_cursor()
325 row = lcd_data.cfg_rows - 1; /* Count rows starting w/0 */ in pi_lcd_set_cursor()
327 _pi_lcd_command(gpio_dev, (LCD_SET_DDRAM_ADDR | (col + lcd_data.row_offsets[row]))); in pi_lcd_set_cursor()
342 lcd_data.disp_cntl |= LCD_DISPLAY_ON; in pi_lcd_display_on()
344 LCD_DISPLAY_CONTROL | lcd_data.disp_cntl); in pi_lcd_display_on()
350 lcd_data.disp_cntl &= ~LCD_DISPLAY_ON; in pi_lcd_display_off()
352 LCD_DISPLAY_CONTROL | lcd_data.disp_cntl); in pi_lcd_display_off()
359 lcd_data.disp_cntl &= ~LCD_CURSOR_ON; in pi_lcd_cursor_off()
361 LCD_DISPLAY_CONTROL | lcd_data.disp_cntl); in pi_lcd_cursor_off()
367 lcd_data.disp_cntl |= LCD_CURSOR_ON; in pi_lcd_cursor_on()
369 LCD_DISPLAY_CONTROL | lcd_data.disp_cntl); in pi_lcd_cursor_on()
376 lcd_data.disp_cntl &= ~LCD_BLINK_ON; in pi_lcd_blink_off()
378 LCD_DISPLAY_CONTROL | lcd_data.disp_cntl); in pi_lcd_blink_off()
384 lcd_data.disp_cntl |= LCD_BLINK_ON; in pi_lcd_blink_on()
386 LCD_DISPLAY_CONTROL | lcd_data.disp_cntl); in pi_lcd_blink_on()
406 lcd_data.disp_mode |= LCD_ENTRY_LEFT; in pi_lcd_left_to_right()
408 LCD_ENTRY_MODE_SET | lcd_data.disp_cntl); in pi_lcd_left_to_right()
414 lcd_data.disp_mode &= ~LCD_ENTRY_LEFT; in pi_lcd_right_to_left()
416 LCD_ENTRY_MODE_SET | lcd_data.disp_cntl); in pi_lcd_right_to_left()
422 lcd_data.disp_mode |= LCD_ENTRY_SHIFT_INCREMENT; in pi_lcd_auto_scroll_right()
424 LCD_ENTRY_MODE_SET | lcd_data.disp_cntl); in pi_lcd_auto_scroll_right()
430 lcd_data.disp_mode &= ~LCD_ENTRY_SHIFT_INCREMENT; in pi_lcd_auto_scroll_left()
432 LCD_ENTRY_MODE_SET | lcd_data.disp_cntl); in pi_lcd_auto_scroll_left()
458 lcd_data.disp_func |= LCD_2_LINE; in pi_lcd_init()
460 lcd_data.cfg_rows = rows; in pi_lcd_init()
466 lcd_data.disp_func |= LCD_5x10_DOTS; in pi_lcd_init()
479 if (lcd_data.disp_func & LCD_8BIT_MODE) { in pi_lcd_init()
512 _pi_lcd_command(gpio_dev, (LCD_FUNCTION_SET | lcd_data.disp_func)); in pi_lcd_init()
515 lcd_data.disp_cntl = LCD_DISPLAY_ON | LCD_CURSOR_OFF | LCD_BLINK_OFF; in pi_lcd_init()
522 lcd_data.disp_mode = LCD_ENTRY_LEFT | LCD_ENTRY_SHIFT_DECREMENT; in pi_lcd_init()
524 _pi_lcd_command(gpio_dev, LCD_ENTRY_MODE_SET | lcd_data.disp_mode); in pi_lcd_init()