Skip to content

Commit

Permalink
led: add manual override switch
Browse files Browse the repository at this point in the history
  • Loading branch information
vk2seb committed Dec 7, 2023
1 parent 2190a91 commit 73626de
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions gateware/eurorack_pmod.sv
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ module eurorack_pmod #(
output [7:0] touch6,
output [7:0] touch7,

// LED color values.
input [7:0] led_mode, // 1 == audio sample passthrough, 0 == manual set
input signed [7:0] led0,
input signed [7:0] led1,
input signed [7:0] led2,
input signed [7:0] led3,
input signed [7:0] led4,
input signed [7:0] led5,
input signed [7:0] led6,
input signed [7:0] led7,

// Signals used for bringup / debug / calibration.
//
// Raw samples from the CODEC ADCs
Expand Down Expand Up @@ -148,14 +159,14 @@ pmod_i2c_master #(
.sda_oe(i2c_sda_oe),
.sda_i(i2c_sda_i),

.led0(cal_in0[W-1:W-8]),
.led1(cal_in1[W-1:W-8]),
.led2(cal_in2[W-1:W-8]),
.led3(cal_in3[W-1:W-8]),
.led4(cal_out0[W-1:W-8]),
.led5(cal_out1[W-1:W-8]),
.led6(cal_out2[W-1:W-8]),
.led7(cal_out3[W-1:W-8]),
.led0(led_mode[0] ? cal_in0[W-1:W-8] : led0),
.led1(led_mode[1] ? cal_in1[W-1:W-8] : led1),
.led2(led_mode[2] ? cal_in2[W-1:W-8] : led2),
.led3(led_mode[3] ? cal_in3[W-1:W-8] : led3),
.led4(led_mode[4] ? cal_out0[W-1:W-8] : led4),
.led5(led_mode[5] ? cal_out1[W-1:W-8] : led5),
.led6(led_mode[6] ? cal_out2[W-1:W-8] : led6),
.led7(led_mode[7] ? cal_out3[W-1:W-8] : led7),

.touch0(touch0),
.touch1(touch1),
Expand Down

0 comments on commit 73626de

Please sign in to comment.