mirror of
https://github.com/Vale54321/schafkopf-bot.git
synced 2025-12-16 03:39:34 +01:00
added arduino nfcReader files (#42)
This commit is contained in:
committed by
GitHub
parent
76cb0eaf1a
commit
6259d0bef3
25
Arduino/nfcReader/NDEF/Due.h
Normal file
25
Arduino/nfcReader/NDEF/Due.h
Normal file
@@ -0,0 +1,25 @@
|
||||
// redefine some stuff so code works on Due
|
||||
// http://arduino.cc/forum/index.php?&topic=153761.0
|
||||
|
||||
#ifndef Due_h
|
||||
#define Due_h
|
||||
|
||||
#if defined(__SAM3X8E__)
|
||||
#define PROGMEM
|
||||
#define pgm_read_byte(x) (*((char *)x))
|
||||
// #define pgm_read_word(x) (*((short *)(x & 0xfffffffe)))
|
||||
#define pgm_read_word(x) ( ((*((unsigned char *)x + 1)) << 8) + (*((unsigned char *)x)))
|
||||
#define pgm_read_byte_near(x) (*((char *)x))
|
||||
#define pgm_read_byte_far(x) (*((char *)x))
|
||||
// #define pgm_read_word_near(x) (*((short *)(x & 0xfffffffe))
|
||||
// #define pgm_read_word_far(x) (*((short *)(x & 0xfffffffe)))
|
||||
#define pgm_read_word_near(x) ( ((*((unsigned char *)x + 1)) << 8) + (*((unsigned char *)x)))
|
||||
#define pgm_read_word_far(x) ( ((*((unsigned char *)x + 1)) << 8) + (*((unsigned char *)x))))
|
||||
#define PSTR(x) x
|
||||
#if defined F
|
||||
#undef F
|
||||
#endif
|
||||
#define F(X) (X)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user