Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
test_bswap.c File Reference
#include <inttypes.h>
#include "mcu.h"
+ Include dependency graph for test_bswap.c:

Go to the source code of this file.

Macros

#define MyByteSwap16(n)
 
#define MyByteSwap32(n)
 
#define MyByteSwap32_1(in, out)
 
#define MyByteSwap16_1(in, out)
 

Functions

int main (void)
 

Macro Definition Documentation

#define MyByteSwap16 (   n)
Value:
( ((((uint16_t) n) << 8) & 0xFF00) | \
((((uint16_t) n) >> 8) & 0x00FF) )
unsigned short uint16_t
Definition: types.h:16

Definition at line 6 of file test_bswap.c.

Referenced by main().

#define MyByteSwap16_1 (   in,
  out 
)
Value:
asm volatile ( \
"rev16 %0, %1\n\t" \
: "=r" (out) \
: "r"(in) \
);

Definition at line 24 of file test_bswap.c.

Referenced by main().

#define MyByteSwap32 (   n)
Value:
( ((((uint32_t) n) << 24) & 0xFF000000) | \
((((uint32_t) n) << 8) & 0x00FF0000) | \
((((uint32_t) n) >> 8) & 0x0000FF00) | \
((((uint32_t) n) >> 24) & 0x000000FF) )
unsigned long uint32_t
Definition: types.h:18

Definition at line 10 of file test_bswap.c.

Referenced by main().

#define MyByteSwap32_1 (   in,
  out 
)
Value:
asm volatile ( \
"rev %0, %1\n\t" \
: "=r" (out) \
: "r"(in) \
);

Definition at line 16 of file test_bswap.c.

Referenced by main().

Function Documentation

int main ( void  )

Definition at line 33 of file test_bswap.c.

References foo, MyByteSwap16, MyByteSwap16_1, MyByteSwap32, and MyByteSwap32_1.