Skip to content

Commit

Permalink
Remove local armsrc/stdint.h and fix some other #includes
Browse files Browse the repository at this point in the history
  • Loading branch information
pwpiwi committed Mar 6, 2017
1 parent 8a8e7c6 commit b8e461f
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 47 deletions.
1 change: 1 addition & 0 deletions armsrc/BigBuf.c
Expand Up @@ -13,6 +13,7 @@
#include "proxmark3.h"
#include "apps.h"
#include "string.h"
#include "util.h"

// BigBuf is the large multi-purpose buffer, typically used to hold A/D samples or traces.
// Also used to hold various smaller buffers and the Mifare Emulator Memory.
Expand Down
3 changes: 0 additions & 3 deletions armsrc/Makefile
Expand Up @@ -33,9 +33,6 @@ APP_CFLAGS += $(ZLIB_CFLAGS)
# zlib includes:
APP_CFLAGS += -I../zlib

# stdint.h provided locally until GCC 4.5 becomes C99 compliant
APP_CFLAGS += -I.

# Compile these in thumb mode (small size)
THUMBSRC = start.c \
$(SRC_LCD) \
Expand Down
10 changes: 4 additions & 6 deletions armsrc/appmain.c
Expand Up @@ -10,20 +10,18 @@
// executes.
//-----------------------------------------------------------------------------

#include <stdarg.h>

#include "usb_cdc.h"
#include "cmd.h"

#include "proxmark3.h"
#include "apps.h"
#include "util.h"
#include "printf.h"
#include "string.h"

#include <stdarg.h>

#include "legicrf.h"
#include <hitag2.h>
#include <hitagS.h>
#include "hitag2.h"
#include "hitagS.h"
#include "lfsampling.h"
#include "BigBuf.h"
#include "mifareutil.h"
Expand Down
1 change: 1 addition & 0 deletions armsrc/apps.h
Expand Up @@ -15,6 +15,7 @@
#include <stdint.h>
#include <stddef.h>
#include "common.h"
#include "usb_cmd.h"
#include "hitag2.h"
#include "hitagS.h"
#include "mifare.h"
Expand Down
2 changes: 1 addition & 1 deletion armsrc/des.c
Expand Up @@ -26,7 +26,7 @@
*
*/
#include <stdint.h>
#include <string.h>
#include "string.h"

const uint8_t sbox[256] = {
/* S-box 1 */
Expand Down
4 changes: 4 additions & 0 deletions armsrc/epa.c
Expand Up @@ -11,10 +11,14 @@
// functions, You need to do the setup before calling them!
//-----------------------------------------------------------------------------

#include "apps.h"
#include "iso14443a.h"
#include "iso14443b.h"
#include "epa.h"
#include "cmd.h"
#include "fpgaloader.h"
#include "string.h"
#include "util.h"

// Protocol and Parameter Selection Request for ISO 14443 type A cards
// use regular (1x) speed in both directions
Expand Down
3 changes: 1 addition & 2 deletions armsrc/optimized_cipher.c
Expand Up @@ -61,8 +61,7 @@
**/

#include "optimized_cipher.h"
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>

Expand Down
1 change: 1 addition & 0 deletions armsrc/pcf7931.c
Expand Up @@ -2,6 +2,7 @@
#include "apps.h"
#include "lfsampling.h"
#include "pcf7931.h"
#include "util.h"
#include "string.h"

#define T0_PCF 8 //period for the pcf7931 in us
Expand Down
3 changes: 0 additions & 3 deletions armsrc/printf.c
Expand Up @@ -40,9 +40,6 @@
#include "util.h"
#include "string.h"

typedef uint32_t uintmax_t;
typedef int32_t intmax_t;

typedef unsigned char u_char;
typedef unsigned int u_int;
typedef unsigned long u_long;
Expand Down
27 changes: 0 additions & 27 deletions armsrc/stdint.h

This file was deleted.

2 changes: 1 addition & 1 deletion armsrc/string.h
Expand Up @@ -13,7 +13,7 @@
#define __STRING_H

#include <stdint.h>
#include <util.h>
#include "util.h"

int strlen(const char *str);
RAMFUNC void *memcpy(void *dest, const void *src, int len);
Expand Down
6 changes: 6 additions & 0 deletions include/hitag2.h
Expand Up @@ -13,6 +13,12 @@
#ifndef _HITAG2_H_
#define _HITAG2_H_

#ifdef _MSC_VER
#define PACKED
#else
#define PACKED __attribute__((packed))
#endif

typedef enum {
RHTSF_CHALLENGE = 01,
RHTSF_KEY = 02,
Expand Down
6 changes: 2 additions & 4 deletions include/hitagS.h
Expand Up @@ -10,13 +10,11 @@
//-----------------------------------------------------------------------------


#include <stdlib.h>
#include <string.h>
#include <hitag2.h>

#ifndef _HITAGS_H_
#define _HITAGS_H_

#include "hitag2.h"

typedef enum PROTO_STATE {READY=0,INIT,AUTHENTICATE,SELECTED,QUIET,TTF,FAIL} PSTATE; //protocol-state
typedef enum TAG_STATE {NO_OP=0,READING_PAGE,WRITING_PAGE_ACK,WRITING_PAGE_DATA,WRITING_BLOCK_DATA} TSATE; //tag-state
typedef enum SOF_TYPE {STANDARD=0,ADVANCED,FAST_ADVANCED,ONE,NO_BITS} stype; //number of start-of-frame bits
Expand Down

0 comments on commit b8e461f

Please sign in to comment.