]> git.zerfleddert.de Git - proxmark3-svn/blame - include/common.h
CHG: breaking, forgot some..
[proxmark3-svn] / include / common.h
CommitLineData
534983d7 1//-----------------------------------------------------------------------------
2// Hagen Fritsch - June 2010
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//-----------------------------------------------------------------------------
9// Interlib Definitions
10//-----------------------------------------------------------------------------
11
12#ifndef __COMMON_H
13#define __COMMON_H
14
99136c6e 15#ifdef __cplusplus
16extern "C" {
17#endif
18
902cb3c0 19#include <stddef.h>
873014de 20#include <stdint.h>
902cb3c0 21#include <stdbool.h>
22#include <at91sam7s512.h>
d19929cb 23typedef unsigned char byte_t;
873014de 24
53d5dc64 25// debug
26// 0 - no debug messages 1 - error messages 2 - all messages 4 - extended debug mode
99136c6e 27#define MF_DBG_NONE 0
53d5dc64 28#define MF_DBG_ERROR 1
29#define MF_DBG_ALL 2
30#define MF_DBG_EXTENDED 4
31extern int MF_DBGLEVEL;
32
33// reader voltage field detector
34#define MF_MINFIELDV 4000
35
759c16b3 36#ifndef MIN
37# define MIN(a, b) (((a) < (b)) ? (a) : (b))
38#endif
f2c2b174 39
759c16b3 40#ifndef MAX
41# define MAX(a, b) (((a) > (b)) ? (a) : (b))
42#endif
28fdb04f 43
f2c2b174 44#ifndef ABS
45# define ABS(a) ( ((a)<0) ? -(a) : (a) )
46#endif
ce55f5a2 47#define RAMFUNC __attribute((long_call, section(".ramfunc")))
99136c6e 48
49
50#ifdef __cplusplus
51}
52#endif
53
54#endif
Impressum, Datenschutz