driver number: 0x80005

HD44780

Overview

The HD44780 LCD driver allows userspace access to a device connected this way:

  • RS pin: GPIO PIN
  • RW pin: GND
  • EN pin: GPIO PIN
  • DATA4 pin: GPIO PIN
  • DATA5 pin: GPIO PIN
  • DATA6 pin: GPIO PIN
  • DATA7 pin: GPIO PIN

The pins numbers are set up in the HD44780 component.

Command

  • Command number: 0

    Description: Initialize the HD44780 LCD using two arguments given.

    Argument 1: Number of columns on the LCD.

    Argument 2: Number of lines on the LCD.

    Returns: SUCCESS if the command was saved successfully in the command buffer, EBUSY otherwise (the buffer was full).

  • Command number: 1

    Description: Set cursor to a given position.

    Argument 1: The column on which to set the cursor.

    Argument 2: The line on which to set the cursor.

    Returns: SUCCESS if the command was saved successfully, EBUSY otherwise.

  • Command number: 2

    Description: Home command, clears the display and sets the cursor to (0,0).

    Argument 1: unused

    Argument 2: unused

    Returns: SUCCESS if the command was saved successfully, EBUSY otherwise.

  • Command number: 3

    Description: Clear command, clears the display and sets the cursor to (0,0).

    Argument 1: unused

    Argument 2: unused

    Returns: SUCCESS if the command was saved successfully, EBUSY otherwise.

  • Command number: 4

    Description: Left_to_right or Right_to_left command.

    Argument 1:

    0: - Left_to_right: flow the text from left to right.

    1 - Right_to_left: flow the text from right to left.

    Argument 2: unused

    Returns: SUCCESS if the command was saved successfully, EBUSY otherwise.

  • Command number: 5

    Description: Autoscroll or No_autoscroll command.

    Argument 1:

    0: - Autoscroll: 'right justify' the text from the cursor.

    1: - No_autoscroll: 'left justify' the text from the cursor.

    Argument 2: unused

    Returns: SUCCESS if the command was saved successfully, EBUSY otherwise.

  • Command number: 6

    Description: Cursor or No_cursor command.

    Argument 1:

    0 - Cursor: Turn on the underline cursor.

    1 - No_cursor: Turn off the underline cursor.

    Argument 2: unused

    Returns: SUCCESS if the command was saved successfully, EBUSY otherwise.

    Description: Display or No_display command.

    Argument 1:

    0 - Display: Turn on the display very quickly.

    1 - No_display: Turn off the display very quickly.

    Argument 2: unused

    Returns: SUCCESS if the command was saved successfully, EBUSY otherwise.

    Description: Blink or No_blink command.

    Argument 1:

    0 - Blink: Turn on the blinking cursor display.

    1 - No_blink: Turn off the blinking cursor display.

    Argument 2: unused

    Returns: SUCCESS if the command was saved successfully, EBUSY otherwise.

    Description: Scroll_display_left or Scroll_display_right command.

    Argument 1:

    0 - Scroll_display_left: Scroll the display to the left without changing the RAM.

    1 - Scroll_display_right: Scroll the display to the right without changing the RAM.

    Argument 2: unused

    Returns: SUCCESS if the command was saved successfully, EBUSY otherwise.

Allow

  • Allow number: 0

    Description: Send a buffer from the userspace to the kernelspace to be displayed on the LCD.

    Argument 1: Slice -> the buffer sent to be displayed.

    Returns: SuccessWithValue, the number of bytes saved to the command buffer to the displayed.

Subscribe

Unimplemented for the LCD_16x2 driver. Will always return ENOSUPPORT.

Yield

Unimplemented.