laforge submitted this change.

View Change


Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified
icE1usb fw: Always define NUM_E1_PORTS in Makefile

So that it's available without having to include the USB include ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I0b434cef7a662c19e5f48072285c013e8c02e254
---
M firmware/ice40-riscv/icE1usb/Makefile
M firmware/ice40-riscv/icE1usb/usb_desc_ids.h
2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/firmware/ice40-riscv/icE1usb/Makefile b/firmware/ice40-riscv/icE1usb/Makefile
index f385408..5fcd1f7 100644
--- a/firmware/ice40-riscv/icE1usb/Makefile
+++ b/firmware/ice40-riscv/icE1usb/Makefile
@@ -19,6 +19,8 @@

ifeq ($(SINGLE_CHANNEL),1)
CFLAGS += -DNUM_E1_PORTS=1
+else
+CFLAGS += -DNUM_E1_PORTS=2
endif

NO2USB_FW_VERSION=0
diff --git a/firmware/ice40-riscv/icE1usb/usb_desc_ids.h b/firmware/ice40-riscv/icE1usb/usb_desc_ids.h
index df0331e..b9a7032 100644
--- a/firmware/ice40-riscv/icE1usb/usb_desc_ids.h
+++ b/firmware/ice40-riscv/icE1usb/usb_desc_ids.h
@@ -7,10 +7,6 @@

#pragma once

-#ifndef NUM_E1_PORTS
-# define NUM_E1_PORTS 2
-#endif
-
#define USB_INTF_E1(p) (0 + (p))
#define USB_INTF_GPS_CDC_CTL (NUM_E1_PORTS + 0)
#define USB_INTF_GPS_CDC_DATA (NUM_E1_PORTS + 1)

To view, visit change 36681. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I0b434cef7a662c19e5f48072285c013e8c02e254
Gerrit-Change-Number: 36681
Gerrit-PatchSet: 3
Gerrit-Owner: tnt <tnt@246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-MessageType: merged