Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
user_io: listen only to the new mouse controls (rkrajnc#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyurco committed Jun 27, 2020
1 parent fcb612a commit d7c8ea7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions rtl/mist/user_io.v
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,9 @@ always @(posedge clk_sys) begin
if(abyte_cnt == 0) begin
acmd <= spi_byte_in;
case (spi_byte_in)
8'h04, 8'h70: begin
8'h70, 8'h71: begin
kbd_mouse_type <= 2'b00; // x axis
mouse_idx <= 0; // first mouse
end
8'h71: begin
kbd_mouse_type <= 2'b00; // x axis
mouse_idx <= 1; // second mouse
mouse_idx <= spi_byte_in[0]; // mouse select
end
8'h05: kbd_mouse_type <= 2'b10; // keyboard
8'h06: kbd_mouse_type <= 2'b11; // OSD keyboard
Expand All @@ -156,7 +152,7 @@ always @(posedge clk_sys) begin
8'h62: if (abyte_cnt < 5) joystick_2[(abyte_cnt-1)<<3 +:8] <= spi_byte_in;
8'h63: if (abyte_cnt < 5) joystick_3[(abyte_cnt-1)<<3 +:8] <= spi_byte_in;
8'h64: if (abyte_cnt < 5) joystick_4[(abyte_cnt-1)<<3 +:8] <= spi_byte_in;
8'h04, 8'h70, 8'h71:
8'h70, 8'h71:
begin
if (abyte_cnt == 8'd1) begin
kbd_mouse_data <= spi_byte_in;
Expand Down

0 comments on commit d7c8ea7

Please sign in to comment.