Skip to content
This repository was archived by the owner on Dec 24, 2024. It is now read-only.

Commit 43d2dc3

Browse files
committed
eda: drop id field from Device, drop difIDFrom func
1 parent 880a7b9 commit 43d2dc3

File tree

4 files changed

+1
-15
lines changed

4 files changed

+1
-15
lines changed

eda/device.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import (
2727

2828
const (
2929
nRFM = 4
30-
difIDOffset = 0x00
31-
3230
nHR = 8
3331
nBitsCfgHR = 872
3432
nBytesCfgHR = 109
@@ -59,8 +57,7 @@ var _ device = (*Device)(nil)
5957
// Device represents an EDA board device.
6058
type Device struct {
6159
msg *log.Logger
62-
id uint32 // [0,8)
63-
rfms []int // list of enabled RFM slots
60+
rfms []int // list of enabled RFM slots
6461
mem struct {
6562
fd *os.File
6663
lw *mmap.Handle

eda/device_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ import (
1818
)
1919

2020
func TestRun(t *testing.T) {
21-
const (
22-
daqAddr = ":9999"
23-
edaID = 1
24-
)
25-
2621
sink := func(done chan int, rfm int) string {
2722
srv, err := net.Listen("tcp", ":0")
2823
if err != nil {
@@ -131,7 +126,6 @@ func TestRun(t *testing.T) {
131126
}
132127
defer dev.Close()
133128

134-
dev.id = edaID
135129
dev.rfms = []int{tc.rfm}
136130
dev.cfg.daq.addrs = []string{rfmAddr}
137131

eda/pio.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,10 +1825,6 @@ func (dev *Device) daqFIFOFillLevel(rfm int) uint32 {
18251825
// return nRAMUnits
18261826
// }
18271827

1828-
func difIDFrom(id uint32, rfm int) byte {
1829-
return difIDOffset + byte(id&7)<<3 + byte(rfm)&3
1830-
}
1831-
18321828
func (dev *Device) daqWriteDIFData(w io.Writer, slot int) {
18331829
var (
18341830
rfm = &dev.daq.rfm[slot]

eda/standalone.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func newStandalone(odir, devmem, devshm string, run int, opts ...Option) (*stand
2626
if err != nil {
2727
return nil, fmt.Errorf("could not create EDA device: %w", err)
2828
}
29-
dev.id = 1
3029
srv := &standalone{
3130
dev: dev,
3231
run: uint32(run),

0 commit comments

Comments
 (0)