laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36681?usp=email )

Change subject: icE1usb fw: Always define NUM_E1_PORTS in Makefile
......................................................................

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 <[email protected]>
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(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




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 https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36681?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I0b434cef7a662c19e5f48072285c013e8c02e254
Gerrit-Change-Number: 36681
Gerrit-PatchSet: 3
Gerrit-Owner: tnt <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged

Reply via email to