File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ Commands:
979700 0000011 : start write to current address
989800 0001000 : start address block
999900 0001001 : start data block
100+ 00 1000001 : send I2C stop
10010101 aaaaaaa : start write to address
1011021 dddddddd : write 8-bit data
102103
@@ -266,6 +267,16 @@ always @* begin
266267
267268 address_next = address_reg + 1 ;
268269
270+ state_next = STATE_RUN;
271+ end else if (init_data_reg == 9'b001000001 ) begin
272+ // send stop
273+ cmd_write_next = 1'b0 ;
274+ cmd_start_next = 1'b0 ;
275+ cmd_stop_next = 1'b1 ;
276+ cmd_valid_next = 1'b1 ;
277+
278+ address_next = address_reg + 1 ;
279+
269280 state_next = STATE_RUN;
270281 end else if (init_data_reg == 9'b000001001 ) begin
271282 // data table start
@@ -377,6 +388,16 @@ always @* begin
377388
378389 address_next = address_reg + 1 ;
379390
391+ state_next = STATE_TABLE_3;
392+ end else if (init_data_reg == 9'b001000001 ) begin
393+ // send stop
394+ cmd_write_next = 1'b0 ;
395+ cmd_start_next = 1'b0 ;
396+ cmd_stop_next = 1'b1 ;
397+ cmd_valid_next = 1'b1 ;
398+
399+ address_next = address_reg + 1 ;
400+
380401 state_next = STATE_TABLE_3;
381402 end else if (init_data_reg == 9'b000001001 ) begin
382403 // data table start
You can’t perform that action at this time.
0 commit comments