Skip to content

Commit

Permalink
fix stray I2C register write bug #798
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Gardner-Stephen committed Apr 6, 2024
1 parent 77947f4 commit f1a836d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vhdl/keypad_i2c.vhdl
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,10 @@ begin
command_en <= '1';
i2c1_rw <= '0';
i2c1_wdata <= write_val;
when max_state+3 =>
-- Dummy state so that STOP gets emmitted after writing the single byte.
-- This fixes stray writes to adjacent registers.
null;
when others =>
if last_busy_count /= busy_count then
report "in others";
Expand Down

0 comments on commit f1a836d

Please sign in to comment.