mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-30 19:40:09 -07:00
USB comms: part 3 towards @micolous PR#463
* change variable 'sp' from global to static * move code to open and close USB port to comms.c (OpenProxmark() and CloseProxmark()) * change scope of USBCommandReceived() to static * (flasher still unchanged)
This commit is contained in:
parent
61aaee35cc
commit
818efbebb8
3 changed files with 45 additions and 42 deletions
|
@ -31,19 +31,18 @@ typedef struct {
|
|||
} receiver_arg;
|
||||
|
||||
|
||||
// Wrappers required as static variables can only be used in one file.
|
||||
void SetOffline(bool new_offline);
|
||||
bool IsOffline();
|
||||
|
||||
bool OpenProxmark(char *portname, bool waitCOMPort, int timeout);
|
||||
void CloseProxmark(void);
|
||||
|
||||
void SendCommand(UsbCommand *c);
|
||||
|
||||
void *uart_receiver(void *targ);
|
||||
void UsbCommandReceived(UsbCommand *UC);
|
||||
void clearCommandBuffer();
|
||||
bool WaitForResponseTimeoutW(uint32_t cmd, UsbCommand* response, size_t ms_timeout, bool show_warning);
|
||||
bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeout);
|
||||
bool WaitForResponse(uint32_t cmd, UsbCommand* response);
|
||||
|
||||
extern serial_port sp;
|
||||
|
||||
#endif // COMMS_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue