USB Host Shield 2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros
macros.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SWAP(a, b)   (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))
 
#define __BYTE_GRABBING_DEFINED__   1
 
#define BGRAB0(__usi__)   ((uint8_t)((__usi__) & 0xff ))
 
#define BGRAB1(__usi__)   ((uint8_t)(((__usi__) >> 8) & 0xff))
 
#define BGRAB2(__usi__)   ((uint8_t)(((__usi__) >> 16) & 0xff))
 
#define BGRAB3(__usi__)   ((uint8_t)(((__usi__) >> 24) & 0xff))
 
#define BGRAB4(__usi__)   ((uint8_t)(((__usi__) >> 32) & 0xff))
 
#define BGRAB5(__usi__)   ((uint8_t)(((__usi__) >> 40) & 0xff))
 
#define BGRAB6(__usi__)   ((uint8_t)(((__usi__) >> 48) & 0xff))
 
#define BGRAB7(__usi__)   ((uint8_t)(((__usi__) >> 56) & 0xff))
 
#define BOVER1(__usi__)   ((uint16_t)(__usi__) << 8)
 
#define BOVER2(__usi__)   ((uint32_t)(__usi__) << 16)
 
#define BOVER3(__usi__)   ((uint32_t)(__usi__) << 24)
 
#define BOVER4(__usi__)   ((uint64_t)(__usi__) << 32)
 
#define BOVER5(__usi__)   ((uint64_t)(__usi__) << 40)
 
#define BOVER6(__usi__)   ((uint64_t)(__usi__) << 48)
 
#define BOVER7(__usi__)   ((uint64_t)(__usi__) << 56)
 
#define BMAKE16(__usc1__, __usc0__)   ((uint16_t)((uint16_t)(__usc0__) | (uint16_t)BOVER1(__usc1__)))
 
#define BMAKE32(__usc3__, __usc2__, __usc1__, __usc0__)   ((uint32_t)((uint32_t)(__usc0__) | (uint32_t)BOVER1(__usc1__) | (uint32_t)BOVER2(__usc2__) | (uint32_t)BOVER3(__usc3__)))
 
#define BMAKE64(__usc7__, __usc6__, __usc5__, __usc4__, __usc3__, __usc2__, __usc1__, __usc0__)   ((uint64_t)((uint64_t)__usc0__ | (uint64_t)BOVER1(__usc1__) | (uint64_t)BOVER2(__usc2__) | (uint64_t)BOVER3(__usc3__) | (uint64_t)BOVER4(__usc4__) | (uint64_t)BOVER5(__usc5__) | (uint64_t)BOVER6(__usc6__) | (uint64_t)BOVER1(__usc7__)))
 
#define USBTRACE(s)   (Notify(PSTR(s), 0x80))
 
#define USBTRACE2(s, r)   (Notify(PSTR(s), 0x80), D_PrintHex((r), 0x80), Notify(PSTR("\r\n"), 0x80))
 

Macro Definition Documentation

#define SWAP (   a,
 
)    (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))

Definition at line 17 of file macros.h.

#define __BYTE_GRABBING_DEFINED__   1

Definition at line 19 of file macros.h.

#define BGRAB0 (   __usi__)    ((uint8_t)((__usi__) & 0xff ))

Definition at line 34 of file macros.h.

#define BGRAB1 (   __usi__)    ((uint8_t)(((__usi__) >> 8) & 0xff))

Definition at line 35 of file macros.h.

#define BGRAB2 (   __usi__)    ((uint8_t)(((__usi__) >> 16) & 0xff))

Definition at line 36 of file macros.h.

#define BGRAB3 (   __usi__)    ((uint8_t)(((__usi__) >> 24) & 0xff))

Definition at line 37 of file macros.h.

#define BGRAB4 (   __usi__)    ((uint8_t)(((__usi__) >> 32) & 0xff))

Definition at line 38 of file macros.h.

#define BGRAB5 (   __usi__)    ((uint8_t)(((__usi__) >> 40) & 0xff))

Definition at line 39 of file macros.h.

#define BGRAB6 (   __usi__)    ((uint8_t)(((__usi__) >> 48) & 0xff))

Definition at line 40 of file macros.h.

#define BGRAB7 (   __usi__)    ((uint8_t)(((__usi__) >> 56) & 0xff))

Definition at line 41 of file macros.h.

#define BOVER1 (   __usi__)    ((uint16_t)(__usi__) << 8)

Definition at line 43 of file macros.h.

#define BOVER2 (   __usi__)    ((uint32_t)(__usi__) << 16)

Definition at line 44 of file macros.h.

#define BOVER3 (   __usi__)    ((uint32_t)(__usi__) << 24)

Definition at line 45 of file macros.h.

#define BOVER4 (   __usi__)    ((uint64_t)(__usi__) << 32)

Definition at line 46 of file macros.h.

#define BOVER5 (   __usi__)    ((uint64_t)(__usi__) << 40)

Definition at line 47 of file macros.h.

#define BOVER6 (   __usi__)    ((uint64_t)(__usi__) << 48)

Definition at line 48 of file macros.h.

#define BOVER7 (   __usi__)    ((uint64_t)(__usi__) << 56)

Definition at line 49 of file macros.h.

#define BMAKE16 (   __usc1__,
  __usc0__ 
)    ((uint16_t)((uint16_t)(__usc0__) | (uint16_t)BOVER1(__usc1__)))

Definition at line 52 of file macros.h.

#define BMAKE32 (   __usc3__,
  __usc2__,
  __usc1__,
  __usc0__ 
)    ((uint32_t)((uint32_t)(__usc0__) | (uint32_t)BOVER1(__usc1__) | (uint32_t)BOVER2(__usc2__) | (uint32_t)BOVER3(__usc3__)))

Definition at line 53 of file macros.h.

#define BMAKE64 (   __usc7__,
  __usc6__,
  __usc5__,
  __usc4__,
  __usc3__,
  __usc2__,
  __usc1__,
  __usc0__ 
)    ((uint64_t)((uint64_t)__usc0__ | (uint64_t)BOVER1(__usc1__) | (uint64_t)BOVER2(__usc2__) | (uint64_t)BOVER3(__usc3__) | (uint64_t)BOVER4(__usc4__) | (uint64_t)BOVER5(__usc5__) | (uint64_t)BOVER6(__usc6__) | (uint64_t)BOVER1(__usc7__)))

Definition at line 54 of file macros.h.

#define USBTRACE (   s)    (Notify(PSTR(s), 0x80))

Definition at line 60 of file macros.h.

#define USBTRACE2 (   s,
 
)    (Notify(PSTR(s), 0x80), D_PrintHex((r), 0x80), Notify(PSTR("\r\n"), 0x80))

Definition at line 61 of file macros.h.