]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Add support for Pi SDR. Note that in order to get it to run, I had to disable PURESIG...
authorJim Ancona <jim@anconafamily.com>
Sun, 23 Sep 2018 15:15:44 +0000 (11:15 -0400)
committerJim Ancona <jim@anconafamily.com>
Sun, 23 Sep 2018 15:15:44 +0000 (11:15 -0400)
Makefile
Makefile.mac
old_protocol.c

index b7f16709e01c1ba56ec118688af9141069c48853..d0686e959449a3d4ab86306df746d59b3fc1ef3f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,9 @@ GIT_VERSION := $(shell git describe --abbrev=0 --tags)
 # uncommment this line for circumventing problems with RedPitya HPSDR apps.
 #STEMLAB_FIX_OPTION=-DSTEMLAB_FIX
 
+# uncomment the line below to include support for Pi SDR
+#PI_SDR_INCLUDE=PI_SDR
+
 #uncomment the line below for the platform being compiled on (actually not used)
 UNAME_N=raspberrypi
 #UNAME_N=odroid
@@ -193,6 +196,10 @@ STEMLAB_HEADERS=stemlab_discovery.h
 STEMLAB_OBJS=stemlab_discovery.o
 endif
 
+ifeq ($(PI_SDR_INCLUDE),PI_SDR)
+PI_SDR_OPTIONS=-D PI_SDR
+endif
+
 GTKINCLUDES=`pkg-config --cflags gtk+-3.0`
 GTKLIBS=`pkg-config --libs gtk+-3.0`
 
@@ -200,7 +207,7 @@ AUDIO_LIBS=-lasound
 #AUDIO_LIBS=-lsoundio
 
 OPTIONS=-g -Wno-deprecated-declarations $(PURESIGNAL_OPTIONS) $(REMOTE_OPTIONS) $(USBOZY_OPTIONS) $(I2C_OPTIONS) $(GPIO_OPTIONS) $(LIMESDR_OPTIONS) \
-               $(FREEDV_OPTIONS) $(LOCALCW_OPTIONS) $(RADIOBERRY_OPTIONS) $(PSK_OPTIONS) $(STEMLAB_OPTIONS) $(STEMLAB_FIX_OPTION) \
+               $(FREEDV_OPTIONS) $(LOCALCW_OPTIONS) $(RADIOBERRY_OPTIONS) $(PI_SDR_OPTIONS) $(PSK_OPTIONS) $(STEMLAB_OPTIONS) $(STEMLAB_FIX_OPTION) \
                -D GIT_DATE='"$(GIT_DATE)"' -D GIT_VERSION='"$(GIT_VERSION)"' $(DEBUG_OPTION) -O3
 
 LIBS=-lrt -lm -lwdsp -lpthread $(AUDIO_LIBS) $(USBOZY_LIBS) $(PSKLIBS) $(GTKLIBS) $(GPIO_LIBS) $(SOAPYSDRLIBS) $(FREEDVLIBS) $(STEMLAB_LIBS)
index 568a05c1c0cbccf265eb4e8310757377ea1d165c..50ae5c2969191a0e417ddea3e18a1cc5e2c7ac5d 100644 (file)
@@ -33,6 +33,9 @@ STEMLAB_DISCOVERY=STEMLAB_DISCOVERY_NOAVAHI
 # uncommment this line for circumventing problems with RedPitya HPSDR apps.
 STEMLAB_FIX_OPTION=-DSTEMLAB_FIX
 
+# uncomment the line below to include support for Pi SDR
+#PI_SDR_INCLUDE=PI_SDR
+
 #uncomment the line below for the platform being compiled on (actually not used)
 UNAME_N=raspberrypi
 #UNAME_N=odroid
@@ -175,6 +178,10 @@ STEMLAB_HEADERS=stemlab_discovery.h
 STEMLAB_OBJS=stemlab_discovery.o
 endif
 
+ifeq ($(PI_SDR_INCLUDE),PI_SDR)
+PI_SDR_OPTIONS=-D PI_SDR
+endif
+
 GTKINCLUDES=`pkg-config --cflags gtk+-3.0`
 GTKLIBS=`pkg-config --libs gtk+-3.0`
 
@@ -186,7 +193,7 @@ PORTAUDIO_OPTIONS=-DPORTAUDIO
 AUDIO_LIBS=-lportaudio
 
 OPTIONS=-g -Wno-deprecated-declarations $(PURESIGNAL_OPTIONS) $(REMOTE_OPTIONS) $(USBOZY_OPTIONS) $(I2C_OPTIONS) $(GPIO_OPTIONS) $(LIMESDR_OPTIONS) \
-                $(FREEDV_OPTIONS) $(LOCALCW_OPTIONS) $(RADIOBERRY_OPTIONS) $(PSK_OPTIONS) $(STEMLAB_OPTIONS) $(STEMLAB_FIX_OPTION) \
+                $(FREEDV_OPTIONS) $(LOCALCW_OPTIONS) $(RADIOBERRY_OPTIONS) $(PI_SDR_OPTIONS) $(PSK_OPTIONS) $(STEMLAB_OPTIONS) $(STEMLAB_FIX_OPTION) \
                 -D GIT_DATE='"$(GIT_DATE)"' -D GIT_VERSION='"$(GIT_VERSION)"' $(PORTAUDIO_OPTIONS) $(DEBUG_OPTION) -O3
 
 LIBS=-lm -lwdsp -lpthread $(AUDIO_LIBS) $(USBOZY_LIBS) $(PSKLIBS) $(GTKLIBS) $(GPIO_LIBS) $(SOAPYSDRLIBS) $(FREEDVLIBS) $(STEMLAB_LIBS)
index 58bb5b8b643b0c7b65b1ec99b39cf056b9228836..99264c66bee98aa6475f6638aefa6ada092bb6b1 100644 (file)
@@ -552,7 +552,7 @@ static void process_ozy_input_buffer(unsigned char  *buffer) {
 #ifdef PURESIGNAL
     nreceivers=(RECEIVERS*2)+1;
 #else
-       #ifdef RADIOBERRY
+       #if defined(RADIOBERRY) || defined(PI_SDR)
                nreceivers = receivers;
        #else
                nreceivers=RECEIVERS;