Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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

◆ MyByteSwap16

#define MyByteSwap16 (   n)
Value:
( ((((uint16_t) n) << 8) & 0xFF00) | \
((((uint16_t) n) >> 8) & 0x00FF) )
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88

Definition at line 6 of file test_bswap.c.

◆ MyByteSwap16_1

#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.

◆ MyByteSwap32

#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 int uint32_t
Typedef defining 32 bit unsigned int type.
Definition: vl53l1_types.h:78

Definition at line 10 of file test_bswap.c.

◆ MyByteSwap32_1

#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.

Function Documentation

◆ main()

int main ( void  )

Definition at line 33 of file test_bswap.c.

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