10 #ifndef CMD_BUFFER_SIZE
11 #define CMD_BUFFER_SIZE 50
14 #ifndef MAX_DEMOD_BUF_LEN
15 #define MAX_DEMOD_BUF_LEN (1024*128)
19 #define BIGBUF_SIZE 40000
23 // If TRUE, continue running the uart_receiver thread.
26 // Lock around serial port receives
27 pthread_mutex_t recv_lock
;
31 // Wrappers required as static variables can only be used in one file.
32 void SetSerialPort(serial_port
* new_port
);
33 serial_port
* GetSerialPort();
34 void SetOffline(bool new_offline
);
37 void SendCommand(UsbCommand
*c
);
38 void *uart_receiver(void *targ
);
39 void UsbCommandReceived(UsbCommand
*UC
);
40 void clearCommandBuffer();
41 bool WaitForResponseTimeoutW(uint64_t cmd
, UsbCommand
* response
, size_t ms_timeout
, bool show_warning
);
42 bool WaitForResponseTimeout(uint64_t cmd
, UsbCommand
* response
, size_t ms_timeout
);
43 bool WaitForResponse(uint64_t cmd
, UsbCommand
* response
);