]> git.zerfleddert.de Git - proxmark3-svn/blame - client/comms.h
fix 'hf iclass sim':
[proxmark3-svn] / client / comms.h
CommitLineData
f5ecd97b 1//-----------------------------------------------------------------------------
2// Copyright (C) 2009 Michael Gernoth <michael at gernoth.net>
3// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
4//
5// This code is licensed to you under the terms of the GNU GPL, version 2 or,
6// at your option, any later version. See the LICENSE.txt file for the text of
7// the license.
8//-----------------------------------------------------------------------------
9// Code for communicating with the proxmark3 hardware.
10//-----------------------------------------------------------------------------
11
12#ifndef COMMS_H_
13#define COMMS_H_
14
15#include <stdbool.h>
16#include <pthread.h>
17
18#include "usb_cmd.h"
19#include "uart.h"
20
21#ifndef CMD_BUFFER_SIZE
22#define CMD_BUFFER_SIZE 50
23#endif
24
61aaee35 25void SetOffline(bool new_offline);
26bool IsOffline();
27
ad939de5 28bool OpenProxmark(void *port, bool wait_for_port, int timeout, bool flash_mode);
818efbeb 29void CloseProxmark(void);
30
f5ecd97b 31void SendCommand(UsbCommand *c);
32
f5ecd97b 33void clearCommandBuffer();
34bool WaitForResponseTimeoutW(uint32_t cmd, UsbCommand* response, size_t ms_timeout, bool show_warning);
35bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeout);
36bool WaitForResponse(uint32_t cmd, UsbCommand* response);
babca445 37bool GetFromBigBuf(uint8_t *dest, int bytes, int start_index, UsbCommand *response, size_t ms_timeout, bool show_warning);
fc52fbd4 38bool GetFromFpgaRAM(uint8_t *dest, int bytes);
f5ecd97b 39
f5ecd97b 40#endif // COMMS_H_
Impressum, Datenschutz