Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
wsad4ryba committed Jul 11, 2024
1 parent 0343f86 commit a6e331f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions RPLCD/i2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __init__(self, i2c_expander, address, expander_params=None, port=1,
self._port = port

# Set i2c expander, 'PCF8574', 'MCP23008' and 'MCP23017' are supported.
if i2c_expander in ['PCF8574', 'MCP23008', 'MCP23017', "JHD1802"]:
if i2c_expander in ['PCF8574', 'MCP23008', 'MCP23017', "JHD1804"]:
self._i2c_expander = i2c_expander
else:
raise NotImplementedError('I2C expander "%s" is not supported.' % i2c_expander)
Expand Down Expand Up @@ -230,7 +230,7 @@ def _send_data(self, value):
self._mcp_data |= MCP230XX_RS
self._pulse_data(value >> 4)
self._pulse_data(value & 0x0F)
elif self._i2c_expander == 'JHD1802':
elif self._i2c_expander == 'JHD1804':
self.bus.write_byte_data(self._address, 0xC0, value)
c.usleep(100)

Expand All @@ -246,7 +246,7 @@ def _send_instruction(self, value):
self._mcp_data &= ~MCP230XX_RS
self._pulse_data(value >> 4)
self._pulse_data(value & 0x0F)
elif self._i2c_expander == 'JHD1802':
elif self._i2c_expander == 'JHD1804':
self.bus.write_byte_data(self._address, 0x80, value)
c.usleep(100)

Expand Down
2 changes: 1 addition & 1 deletion RPLCD/lcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, cols=20, rows=4, dotsize=8, charmap='A02', auto_linebreaks=Tr
self._init_connection()

# Choose 4 or 8 bit mode
if self._i2c_expander != 'JHD1802':
if self._i2c_expander != 'JHD1804':
if self.data_bus_mode == c.LCD_4BITMODE:
# Hitachi manual page 46
self.command(0x03)
Expand Down

0 comments on commit a6e331f

Please sign in to comment.