From e740244a63bf70338708ab0619683a156af567b8 Mon Sep 17 00:00:00 2001 From: Marc Majoral Date: Thu, 28 Apr 2022 21:24:15 +0200 Subject: [PATCH] removed the code that was commented out and the file headers that were not used --- src/algorithms/signal_source/libs/fpga_dma.cc | 35 ++----------------- src/algorithms/signal_source/libs/fpga_dma.h | 8 +---- 2 files changed, 4 insertions(+), 39 deletions(-) diff --git a/src/algorithms/signal_source/libs/fpga_dma.cc b/src/algorithms/signal_source/libs/fpga_dma.cc index 15c214683..9afbacf24 100644 --- a/src/algorithms/signal_source/libs/fpga_dma.cc +++ b/src/algorithms/signal_source/libs/fpga_dma.cc @@ -15,29 +15,12 @@ */ #include "fpga_dma.h" -#include #include -#include // for operator<< -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for std::cerr +#include // for ioctl() +#include // libraries used by the GIPO #include -//Fpga_DMA::Fpga_DMA() -//{ -// -//} - - int Fpga_DMA::DMA_open() { tx_channel.fd = open("/dev/dma_proxy_tx", O_RDWR); @@ -55,11 +38,6 @@ int Fpga_DMA::DMA_open() return -1; } - - //buffer = std::vector(BUFFER_SIZE); - //tx_channel.buf_ptr[0].buffer2 = buffer; - //tx_channel.buf_ptr[0].buffer = &buffer; - return 0; } @@ -75,13 +53,6 @@ int Fpga_DMA::DMA_write(int nbytes) int buffer_id = 0; tx_channel.buf_ptr[0].length = nbytes; - //std::cout << "transmitting " << nbytes << " bytes" << std::endl; - - // debug write values to buffer - //for (uint k= 0; k < 512; k++) - //{ - // tx_channel.buf_ptr[0].buffer[k] = k; - //} // start DMA transfer if (ioctl(tx_channel.fd, START_XFER, &buffer_id)) diff --git a/src/algorithms/signal_source/libs/fpga_dma.h b/src/algorithms/signal_source/libs/fpga_dma.h index f652cbc8f..6fe2b12e6 100644 --- a/src/algorithms/signal_source/libs/fpga_dma.h +++ b/src/algorithms/signal_source/libs/fpga_dma.h @@ -18,8 +18,7 @@ #ifndef GNSS_SDR_FPGA_DMA_H #define GNSS_SDR_FPGA_DMA_H -#include -#include +#include // for int8_t #define BUFFER_SIZE (128 * 1024) /* must match driver exactly */ @@ -31,10 +30,7 @@ // channel buffer structure struct channel_buffer { - //unsigned int buffer[BUFFER_SIZE / sizeof(unsigned int)]; int8_t buffer[BUFFER_SIZE]; - //int8_t *buffer2; - //std::vector * buffer; enum proxy_status { PROXY_NO_ERROR = 0, @@ -89,7 +85,5 @@ public: private: channel tx_channel; - //int8_t buffer[BUFFER_SIZE]; - //std::vector buffer; }; #endif // GNSS_SDR_FPGA_DMA_H