Download avr-libc - TuxGraphics.org

Transcript
<util/parity.h>: Parity bit generation
22.30
315
22.30 <util/parity.h>: Parity bit generation
Defines
• #define parity_even_bit(val)
22.30.1
Detailed Description
#include <util/parity.h>
This header file contains optimized assembler code to calculate the parity bit for a byte.
22.30.2
Define Documentation
22.30.2.1
#define parity_even_bit( val )
Value:
(__extension__({
unsigned char __t;
__asm__ (
"mov __tmp_reg__,%0" "\n\t"
"swap %0" "\n\t"
"eor %0,__tmp_reg__" "\n\t"
"mov __tmp_reg__,%0" "\n\t"
"lsr %0" "\n\t"
"lsr %0" "\n\t"
"eor %0,__tmp_reg__"
: "=r" (__t)
: "0" ((unsigned char)(val))
: "r0"
);
(((__t + 1) >> 1) & 1);
}))
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
Returns
1 if val has an odd number of bits set.
22.31 <util/setbaud.h>: Helper macros for baud rate calculations
Defines
•
•
•
•
•
#define BAUD_TOL 2
#define UBRR_VALUE
#define UBRRL_VALUE
#define UBRRH_VALUE
#define USE_2X 0
Generated on Thu May 19 2011 13:29:12 for avr-libc by Doxygen