mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-17 23:34:56 +00:00
fix code for 32-bit processor architecture
This commit is contained in:
parent
d346e763f8
commit
916b12eef6
@ -23,9 +23,7 @@
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "fpga_buffer_monitor.h"
|
||||
#if INTPTR_MAX == INT64_MAX // 64-bit processor architecture
|
||||
#include "fpga_dma.h"
|
||||
#endif
|
||||
#include "fpga_dynamic_bit_selection.h"
|
||||
#include "fpga_switch.h"
|
||||
#include "gnss_block_interface.h"
|
||||
@ -108,10 +106,7 @@ private:
|
||||
std::shared_ptr<Fpga_Switch> switch_fpga;
|
||||
std::shared_ptr<Fpga_dynamic_bit_selection> dynamic_bit_selection_fpga;
|
||||
std::shared_ptr<Fpga_buffer_monitor> buffer_monitor_fpga;
|
||||
|
||||
#if INTPTR_MAX == INT64_MAX // 64-bit processor architecture
|
||||
std::shared_ptr<Fpga_DMA> dma_fpga;
|
||||
#endif
|
||||
|
||||
std::mutex dma_mutex;
|
||||
std::mutex dynamic_bit_selection_mutex;
|
||||
|
@ -108,10 +108,10 @@ int Fpga_DMA::DMA_write(int nbytes)
|
||||
|
||||
#else // 32-bit processor architecture
|
||||
|
||||
const int num_bytes_sent = write(tx_fd, dma_buffer, nread_elements * 2);
|
||||
if (num_bytes_sent != num_transferred_bytes)
|
||||
const int num_bytes_sent = write(tx_fd, buffer.data(), nbytes);
|
||||
if (num_bytes_sent != nbytes)
|
||||
{
|
||||
return -1
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -79,6 +79,7 @@ public:
|
||||
* \brief Obtain DMA buffer address.
|
||||
*/
|
||||
std::array<int8_t, BUFFER_SIZE> *get_buffer_address(void);
|
||||
|
||||
/*!
|
||||
* \brief Transfer DMA data
|
||||
*/
|
||||
@ -93,7 +94,7 @@ private:
|
||||
#if INTPTR_MAX == INT64_MAX // 64-bit processor architecture
|
||||
channel tx_channel;
|
||||
#else // 32-bit processor architecture
|
||||
std::array<int8_t, BUFFER_SIZE> buffer[BUFFER_SIZE];
|
||||
std::array<int8_t, BUFFER_SIZE> buffer;
|
||||
int tx_fd;
|
||||
#endif
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user