mirror of
https://github.com/preble/libpinproc
synced 2026-02-24 18:25:23 +01:00
Moved libftdi-specific code to PRHardware.cpp and added abstract PRHardware*() functions.
Added PRCommon.h.
This commit is contained in:
@@ -29,9 +29,9 @@
|
||||
*/
|
||||
|
||||
#include "../include/pinproc.h"
|
||||
#include "PRCommon.h"
|
||||
#include "PRHardware.h"
|
||||
#include <queue>
|
||||
#include <ftdi.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -39,13 +39,6 @@ using namespace std;
|
||||
#define maxDrivers (256)
|
||||
#define maxSwitchRules (256<<2) // 8 bits of switchNum indicies plus bits for debounced and state.
|
||||
|
||||
#ifdef NDEBUG
|
||||
# define DEBUG(block)
|
||||
#else
|
||||
# define DEBUG(block) block
|
||||
#endif
|
||||
extern void PRLog(const char *format, ...);
|
||||
|
||||
class PRDevice
|
||||
{
|
||||
public:
|
||||
@@ -117,9 +110,6 @@ protected:
|
||||
queue<uint32_t> unrequestedDataQueue; /**< Queue of words received from the device that were not requested via RequestData(). Usually switch events. */
|
||||
queue<uint32_t> requestedDataQueue; /**< Queue of words received from the device as the result of a call to RequestData(). */
|
||||
|
||||
bool ftdiInitialized;
|
||||
ftdi_context ftdic;
|
||||
|
||||
uint8_t collected_bytes_fifo[FTDI_BUFFER_SIZE];
|
||||
int32_t collected_bytes_rd_addr;
|
||||
int32_t collected_bytes_wr_addr;
|
||||
|
||||
Reference in New Issue
Block a user