1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-17 23:34:56 +00:00

removed the code that was commented out and the file headers that were not used

This commit is contained in:
Marc Majoral 2022-04-28 21:24:15 +02:00
parent 4244944814
commit e740244a63
2 changed files with 4 additions and 39 deletions

View File

@ -15,29 +15,12 @@
*/
#include "fpga_dma.h"
#include <errno.h>
#include <fcntl.h>
#include <iostream> // for operator<<
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/time.h>
#include <time.h>
#include <iostream> // for std::cerr
#include <sys/ioctl.h> // for ioctl()
#include <sys/mman.h> // libraries used by the GIPO
#include <unistd.h>
//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<int8_t>(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))

View File

@ -18,8 +18,7 @@
#ifndef GNSS_SDR_FPGA_DMA_H
#define GNSS_SDR_FPGA_DMA_H
#include <cstdint>
#include <vector>
#include <cstdint> // 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<int8_t> * buffer;
enum proxy_status
{
PROXY_NO_ERROR = 0,
@ -89,7 +85,5 @@ public:
private:
channel tx_channel;
//int8_t buffer[BUFFER_SIZE];
//std::vector<int8_t> buffer;
};
#endif // GNSS_SDR_FPGA_DMA_H