]> cvs.zerfleddert.de Git - proxmark3-svn/blob - armsrc/util.h
621f3fe533da2da316ec659e5d704e9f1ff7f147
[proxmark3-svn] / armsrc / util.h
1 #ifndef __UTIL_H
2 #define __UTIL_H
3
4 #include <stddef.h>
5 #include <stdint.h>
6
7 #define LED_RED 1
8 #define LED_ORANGE 2
9 #define LED_GREEN 4
10 #define LED_RED2 8
11 #define BUTTON_HOLD 1
12 #define BUTTON_NO_CLICK 0
13 #define BUTTON_SINGLE_CLICK -1
14 #define BUTTON_DOUBLE_CLICK -2
15 #define BUTTON_ERROR -99
16 int strlen(const char *str);
17 void *memcpy(void *dest, const void *src, int len);
18 void *memset(void *dest, int c, int len);
19 int memcmp(const void *av, const void *bv, int len);
20 char *strncat(char *dest, const char *src, unsigned int n);
21 void num_to_bytes(uint64_t n, size_t len, uint8_t* dest);
22 uint64_t bytes_to_num(uint8_t* src, size_t len);
23
24 void SpinDelay(int ms);
25 void SpinDelayUs(int us);
26 void LED(int led, int ms);
27 void LEDsoff();
28 int BUTTON_CLICKED(int ms);
29 int BUTTON_HELD(int ms);
30 void FormatVersionInformation(char *dst, int len, const char *prefix, void *version_information);
31
32 #endif
Impressum, Datenschutz