mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-27 10:29:18 +08:00
marcan's patch until he gets commit access. Remove C library's includes from the firmware side since it's not available anyway and not used
This commit is contained in:
parent
cbb03be993
commit
5e174a511b
8 changed files with 85 additions and 7 deletions
|
@ -31,6 +31,9 @@ ARMSRC = fpgaloader.c \
|
|||
legic_prng.c \
|
||||
crc.c
|
||||
|
||||
# stdint.h provided locally until GCC 4.5 becomes C99 compliant
|
||||
APP_CFLAGS += -I.
|
||||
|
||||
# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
|
||||
include ../common/Makefile.common
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <proxmark3.h>
|
||||
#include <stdlib.h>
|
||||
#include "apps.h"
|
||||
#include "legicrf.h"
|
||||
#ifdef WITH_LCD
|
||||
|
@ -20,6 +19,9 @@
|
|||
#define va_end __builtin_va_end
|
||||
int kvsprintf(char const *fmt, void *arg, int radix, va_list ap);
|
||||
|
||||
|
||||
#define abs(x) ( ((x)<0) ? -(x) : (x) )
|
||||
|
||||
//=============================================================================
|
||||
// A buffer where we can queue things up to be sent through the FPGA, for
|
||||
// any purpose (fake tag, as reader, whatever). We go MSB first, since that
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
#include <proxmark3.h>
|
||||
#include "apps.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// FROM winsrc\prox.h //////////////////////////////////
|
||||
#define arraylen(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
|
||||
#include "apps.h"
|
||||
#include "legicrf.h"
|
||||
#include "unistd.h"
|
||||
#include "stdint.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include "legic_prng.h"
|
||||
#include "crc.h"
|
||||
|
|
34
armsrc/stdint.h
Normal file
34
armsrc/stdint.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* bits32/stdint.h
|
||||
*/
|
||||
|
||||
#ifndef _BITSIZE_STDINT_H
|
||||
#define _BITSIZE_STDINT_H
|
||||
|
||||
typedef signed char int8_t;
|
||||
typedef short int int16_t;
|
||||
typedef int int32_t;
|
||||
typedef long long int int64_t;
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short int uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
|
||||
typedef int int_fast16_t;
|
||||
typedef int int_fast32_t;
|
||||
|
||||
typedef unsigned int uint_fast16_t;
|
||||
typedef unsigned int uint_fast32_t;
|
||||
|
||||
typedef int intptr_t;
|
||||
typedef unsigned int uintptr_t;
|
||||
|
||||
#define __INT64_C(c) c ## LL
|
||||
#define __UINT64_C(c) c ## ULL
|
||||
|
||||
#define __PRI64_RANK "ll"
|
||||
#define __PRIFAST_RANK ""
|
||||
#define __PRIPTR_RANK ""
|
||||
|
||||
#endif /* _BITSIZE_STDINT_H */
|
|
@ -12,6 +12,9 @@ ASMSRC = ram-reset.s flash-reset.s
|
|||
ARMSRC := $(ARMSRC) $(THUMBSRC)
|
||||
THUMBSRC :=
|
||||
|
||||
# stdint.h provided locally until GCC 4.5 becomes C99 compliant
|
||||
APP_CFLAGS = -I.
|
||||
|
||||
# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
|
||||
include ../common/Makefile.common
|
||||
|
||||
|
|
34
bootrom/stdint.h
Normal file
34
bootrom/stdint.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* bits32/stdint.h
|
||||
*/
|
||||
|
||||
#ifndef _BITSIZE_STDINT_H
|
||||
#define _BITSIZE_STDINT_H
|
||||
|
||||
typedef signed char int8_t;
|
||||
typedef short int int16_t;
|
||||
typedef int int32_t;
|
||||
typedef long long int int64_t;
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short int uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
|
||||
typedef int int_fast16_t;
|
||||
typedef int int_fast32_t;
|
||||
|
||||
typedef unsigned int uint_fast16_t;
|
||||
typedef unsigned int uint_fast32_t;
|
||||
|
||||
typedef int intptr_t;
|
||||
typedef unsigned int uintptr_t;
|
||||
|
||||
#define __INT64_C(c) c ## LL
|
||||
#define __UINT64_C(c) c ## ULL
|
||||
|
||||
#define __PRI64_RANK "ll"
|
||||
#define __PRIFAST_RANK ""
|
||||
#define __PRIPTR_RANK ""
|
||||
|
||||
#endif /* _BITSIZE_STDINT_H */
|
|
@ -1,5 +1,10 @@
|
|||
#include "unistd.h"
|
||||
#include "stdint.h"
|
||||
#ifndef LEGIC_PRNG_H__
|
||||
#define LEGIC_PRNG_H__
|
||||
|
||||
#include <stdint.h>
|
||||
extern void legic_prng_init(uint8_t init);
|
||||
extern void legic_prng_forward(int count);
|
||||
extern uint8_t legic_prng_get_bit();
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue