mirror of
https://github.com/UzixLS/TSConf_MiST.git
synced 2025-07-18 23:01:37 +03:00
Update sys.
This commit is contained in:
@ -8,10 +8,12 @@ module mcp23009
|
||||
|
||||
output reg [2:0] btn,
|
||||
input [2:0] led,
|
||||
output reg sd_cd,
|
||||
output reg flg_sd_cd,
|
||||
output reg flg_present,
|
||||
output reg flg_mode,
|
||||
|
||||
output scl,
|
||||
inout sda
|
||||
output scl,
|
||||
inout sda
|
||||
);
|
||||
|
||||
|
||||
@ -50,7 +52,9 @@ always@(posedge clk) begin
|
||||
idx <= 0;
|
||||
btn <= 0;
|
||||
rw <= 0;
|
||||
sd_cd <= 1;
|
||||
flg_sd_cd <= 1;
|
||||
flg_present <= 0;
|
||||
flg_mode <= 1;
|
||||
end
|
||||
else begin
|
||||
if(~&init_data[idx]) begin
|
||||
@ -84,7 +88,10 @@ always@(posedge clk) begin
|
||||
state <= 0;
|
||||
rw <= 0;
|
||||
if(!error) begin
|
||||
if(rw) {sd_cd, btn} <= {dout[7], dout[5:3]};
|
||||
if(rw) begin
|
||||
{flg_sd_cd, flg_mode, btn} <= {dout[7:3]};
|
||||
flg_present <= 1;
|
||||
end
|
||||
rw <= ~rw;
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user