Go to the source code of this file.
 | 
| lcm1602_context  | lcm1602_i2c_init (int bus, int address, bool is_expander, uint8_t num_columns, uint8_t num_rows) | 
|   | 
| lcm1602_context  | lcm1602_gpio_init (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t num_columns, uint8_t num_rows) | 
|   | 
| void  | lcm1602_close (lcm1602_context dev) | 
|   | 
| upm_result_t  | lcm1602_write (const lcm1602_context dev, char *buffer, int len) | 
|   | 
| upm_result_t  | lcm1602_set_cursor (const lcm1602_context dev, unsigned int row, unsigned int column) | 
|   | 
| upm_result_t  | lcm1602_clear (const lcm1602_context dev) | 
|   | 
| upm_result_t  | lcm1602_home (const lcm1602_context dev) | 
|   | 
| upm_result_t  | lcm1602_create_char (const lcm1602_context dev, unsigned int slot, lcm1602_custom_char_t data) | 
|   | 
| upm_result_t  | lcm1602_display_on (const lcm1602_context dev, bool on) | 
|   | 
| upm_result_t  | lcm1602_cursor_on (const lcm1602_context dev, bool on) | 
|   | 
| upm_result_t  | lcm1602_cursor_blink_on (const lcm1602_context dev, bool on) | 
|   | 
| upm_result_t  | lcm1602_backlight_on (const lcm1602_context dev, bool on) | 
|   | 
| upm_result_t  | lcm1602_scroll_display_left (const lcm1602_context dev) | 
|   | 
| upm_result_t  | lcm1602_scroll_display_right (const lcm1602_context dev) | 
|   | 
| upm_result_t  | lcm1602_entry_left_to_right (const lcm1602_context dev, bool on) | 
|   | 
| upm_result_t  | lcm1602_autoscroll_on (const lcm1602_context dev, bool on) | 
|   | 
| upm_result_t  | lcm1602_command (const lcm1602_context dev, uint8_t cmd) | 
|   | 
| upm_result_t  | lcm1602_data (const lcm1602_context dev, uint8_t data) | 
|   | 
      
        
          | lcm1602_context lcm1602_i2c_init  | 
          ( | 
          int  | 
          bus,  | 
        
        
           | 
           | 
          int  | 
          address,  | 
        
        
           | 
           | 
          bool  | 
          is_expander,  | 
        
        
           | 
           | 
          uint8_t  | 
          num_columns,  | 
        
        
           | 
           | 
          uint8_t  | 
          num_rows  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
LCM1602 I2C initialization. This is used for those devices using an I2C expander, or other I2C interface. If you are using an expander, you must specify true for the is_expander argument. If not, then the caller of this function is responsible for any transfers to the I2C device. Internally, only direct access to an I2C expander is supported.
- Parameters
 - 
  
    | bus | I2C bus to use.  | 
    | address | I2C address the LCD is configured for.  | 
    | is_expander | True if we are dealing with an I2C expander, false otherwise.  | 
    | num_columns | Number of columns the display has.  | 
    | num_rows | Number of rows the display has.  | 
  
   
- Returns
 - Device Ccontext, or NULL on error. 
 
 
 
      
        
          | lcm1602_context lcm1602_gpio_init  | 
          ( | 
          uint8_t  | 
          rs,  | 
        
        
           | 
           | 
          uint8_t  | 
          enable,  | 
        
        
           | 
           | 
          uint8_t  | 
          d0,  | 
        
        
           | 
           | 
          uint8_t  | 
          d1,  | 
        
        
           | 
           | 
          uint8_t  | 
          d2,  | 
        
        
           | 
           | 
          uint8_t  | 
          d3,  | 
        
        
           | 
           | 
          uint8_t  | 
          num_columns,  | 
        
        
           | 
           | 
          uint8_t  | 
          num_rows  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
LCM1602 GPIO (parallel) initialization, used for GPIO based HD44780 controllers supporting RS, Enable, and 4 data pins in 4-bit mode.
- Parameters
 - 
  
    | rs | Register select pin  | 
    | enable | Enable pin  | 
    | d0 | Data 0 pin  | 
    | d1 | Data 1 pin  | 
    | d2 | Data 2 pin  | 
    | d3 | Data 3 pin  | 
    | num_columns | Number of columns the display has. Default 16.  | 
    | num_rows | Number of rows the display has. Default 2.  | 
  
   
- Returns
 - Device Ccontext, or NULL on error. 
 
 
 
LCM1602 close.
- Parameters
 - 
  
  
 
 
 
      
        
          | upm_result_t lcm1602_write  | 
          ( | 
          const lcm1602_context  | 
          dev,  | 
        
        
           | 
           | 
          char *  | 
          buffer,  | 
        
        
           | 
           | 
          int  | 
          len  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Writes a string to the LCD.
- Parameters
 - 
  
    | dev | The device context.  | 
    | buffer | Character buffer containing characters to write to the display; note: only ASCII characters are supported  | 
    | len | The number of characters to write.  | 
  
   
- Returns
 - UPM result. 
 
 
 
      
        
          | upm_result_t lcm1602_set_cursor  | 
          ( | 
          const lcm1602_context  | 
          dev,  | 
        
        
           | 
           | 
          unsigned int  | 
          row,  | 
        
        
           | 
           | 
          unsigned int  | 
          column  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Sets the cursor to specified coordinates
- Parameters
 - 
  
    | dev | The device context.  | 
    | row | Row to set the cursor to.  | 
    | column | Column to set the cursor to.  | 
  
   
- Returns
 - UPM result. 
 
 
 
Clears the display of all characters.
- Parameters
 - 
  
  
 
- Returns
 - UPM result. 
 
 
 
Returns to the home coordinates (0,0).
- Parameters
 - 
  
  
 
- Returns
 - UPM result. 
 
 
 
Create a custom character.
- Parameters
 - 
  
    | dev | The device context.  | 
    | slot | The character slot to write, only 8 are available.  | 
    | data | The character data (8 bytes) making up the character.  | 
  
   
- Returns
 - UPM result. 
 
 
 
Turn the display on.
- Parameters
 - 
  
    | dev | The device context.  | 
    | on | true to turn display on, false otherwise.  | 
  
   
- Returns
 - UPM result. 
 
 
 
Turn the cursor on.
- Parameters
 - 
  
    | dev | The device context.  | 
    | on | true to turn cursor on, false otherwise.  | 
  
   
- Returns
 - UPM result. 
 
 
 
      
        
          | upm_result_t lcm1602_cursor_blink_on  | 
          ( | 
          const lcm1602_context  | 
          dev,  | 
        
        
           | 
           | 
          bool  | 
          on  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Turn cursor blink on.
- Parameters
 - 
  
    | dev | The device context.  | 
    | on | true to turn cursor blink on, false otherwise.  | 
  
   
- Returns
 - UPM result. 
 
 
 
Turn backlight on.
- Parameters
 - 
  
    | dev | The device context.  | 
    | on | true to turn backlight on, false otherwise.  | 
  
   
- Returns
 - UPM result. 
 
 
 
Scroll the display left, without changing the character RAM.
- Parameters
 - 
  
  
 
- Returns
 - UPM result. 
 
 
 
Scroll the display right, without changing the character RAM.
- Parameters
 - 
  
  
 
- Returns
 - UPM result. 
 
 
 
      
        
          | upm_result_t lcm1602_entry_left_to_right  | 
          ( | 
          const lcm1602_context  | 
          dev,  | 
        
        
           | 
           | 
          bool  | 
          on  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Set the entry mode so that characters are added left to right.
- Parameters
 - 
  
    | dev | The device context.  | 
    | on | true to add characters left to right, false for right to left.  | 
  
   
- Returns
 - UPM result. 
 
 
 
Right justify text entered from the cursor.
- Parameters
 - 
  
    | dev | The device context.  | 
    | on | true right justify text, false to left justify text.  | 
  
   
- Returns
 - UPM result. 
 
 
 
Send a command byte to the controller. This is a low level command and should not be used unless you know what you are doing.
- Parameters
 - 
  
    | dev | The device context.  | 
    | cmd | The command byte to send.  | 
  
   
- Returns
 - UPM result. 
 
 
 
Send a data byte to the controller. This is a low level command and should not be used unless you know what you are doing.
- Parameters
 - 
  
    | dev | The device context.  | 
    | data | The data byte to send.  | 
  
   
- Returns
 - UPM result. 
 
 
 
      
        
          | typedef char lcm1602_custom_char_t[8] |