textual
[RRG-proxmark3.git] / client / src / graph.h
blobfa99b336f6b8dfd5598f2f0405610540932a1abc
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
3 //
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
6 // the license.
7 //-----------------------------------------------------------------------------
8 // Graph utilities
9 //-----------------------------------------------------------------------------
11 #ifndef GRAPH_H__
12 #define GRAPH_H__
14 #include "common.h"
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 void AppendGraph(bool redraw, uint16_t clock, int bit);
21 size_t ClearGraph(bool redraw);
22 bool HasGraphData(void);
23 void setGraphBuf(uint8_t *buff, size_t size);
24 void save_restoreGB(uint8_t saveOpt);
25 size_t getFromGraphBuf(uint8_t *buff);
26 void convertGraphFromBitstream(void);
27 void convertGraphFromBitstreamEx(int hi, int low);
28 bool isGraphBitstream(void);
30 int GetAskClock(const char *str, bool verbose);
31 int GetPskClock(const char *str, bool verbose);
32 int GetPskCarrier(bool verbose);
33 int GetNrzClock(const char *str, bool verbose);
34 int GetFskClock(const char *str, bool verbose);
35 bool fskClocks(uint8_t *fc1, uint8_t *fc2, uint8_t *rf1, int *firstClockEdge);
37 #define MAX_GRAPH_TRACE_LEN (40000 * 8)
38 #define GRAPH_SAVE 1
39 #define GRAPH_RESTORE 0
41 extern int GraphBuffer[MAX_GRAPH_TRACE_LEN];
42 extern size_t GraphTraceLen;
44 #ifdef __cplusplus
46 #endif
47 #endif