Hanna
Sourcecode Batteriemanagementsystem |
Makrodefinitionen | |
#define | __always_inline inline __attribute__((__always_inline__)) |
The function should always be inlined. Mehr ... | |
#define | nop() do { __asm__ __volatile__ ("nop"); } while (0) |
Convenience macros for part checking | |
#define | AVR8_PART_IS_DEFINED(part) (defined(__ ## part ## __) || defined(__AVR_ ## part ## __)) |
AVR XMEGA AU series | |
#define | XMEGA_A3U |
#define | XMEGA_A3BU |
AVR XMEGA families | |
#define | XMEGA_AU (XMEGA_A1U || XMEGA_A3U || XMEGA_A3BU || XMEGA_A4U) |
#define | XMEGA (XMEGA_A || XMEGA_AU || XMEGA_B || XMEGA_C || XMEGA_D || XMEGA_E) |
Usual Constants | |
#define | DISABLE 0 |
#define | ENABLE 1 |
#define | false 0 |
#define | true 1 |
#define | PASS 0 |
#define | FAIL 1 |
#define | LOW 0 |
#define | HIGH 1 |
Optimisation Control | |
#define | __always_optimize __attribute__((optimize(3))) |
The function should always be optimized. Mehr ... | |
Mathematics | |
Compiler optimization for non-constant expressions, only for abs under WinAVR | |
#define | Abs(a) (((a) < 0 ) ? -(a) : (a)) |
Takes the absolute value of a. Mehr ... | |
#define | Min(a, b) (((a) < (b)) ? (a) : (b)) |
Takes the minimal value of a and b. Mehr ... | |
#define | min(a, b) Min(a, b) |
#define | Max(a, b) (((a) > (b)) ? (a) : (b)) |
Takes the maximal value of a and b. Mehr ... | |
#define | max(a, b) Max(a, b) |
MCU Endianism Handling | |
#define | MSB(u16) (((uint8_t* )&u16)[1]) |
#define | LSB(u16) (((uint8_t* )&u16)[0]) |
#define | Swap16(u16) ((uint16_t)(((uint16_t)(u16) >> 8) | ((uint16_t)(u16) << 8))) |
Toggles the endianism of u16 (by swapping its bytes). Mehr ... | |
This collection of macros identify which series and families that the various Atmel parts belong to. These can be used to select part-dependent sections of code at compile time.
#define __always_inline inline __attribute__((__always_inline__)) |
The function should always be inlined.
This annotation instructs the compiler to ignore its inlining heuristics and inline the function no matter how big it thinks it becomes.
Definiert in Zeile 127 der Datei compiler.h.
#define __always_optimize __attribute__((optimize(3))) |
The function should always be optimized.
This annotation instructs the compiler to ignore global optimization settings and always compile the function with a high level of optimization.
Definiert in Zeile 140 der Datei compiler.h.
#define Abs | ( | a | ) | (((a) < 0 ) ? -(a) : (a)) |
Takes the absolute value of a.
a | Input value. |
Definiert in Zeile 158 der Datei compiler.h.
#define Max | ( | a, | |
b | |||
) | (((a) > (b)) ? (a) : (b)) |
Takes the maximal value of a and b.
a | Input value. |
b | Input value. |
Definiert in Zeile 181 der Datei compiler.h.
#define Min | ( | a, | |
b | |||
) | (((a) < (b)) ? (a) : (b)) |
Takes the minimal value of a and b.
a | Input value. |
b | Input value. |
Definiert in Zeile 169 der Datei compiler.h.
#define Swap16 | ( | u16 | ) | ((uint16_t)(((uint16_t)(u16) >> 8) | ((uint16_t)(u16) << 8))) |
Toggles the endianism of u16 (by swapping its bytes).
u16 | U16 of which to toggle the endianism. |
Definiert in Zeile 201 der Datei compiler.h.
#define XMEGA (XMEGA_A || XMEGA_AU || XMEGA_B || XMEGA_C || XMEGA_D || XMEGA_E) |
AVR XMEGA product line
Definiert in Zeile 94 der Datei compiler.h.
#define XMEGA_A3BU |
Definiert in Zeile 80 der Datei compiler.h.
#define XMEGA_A3U |
Definiert in Zeile 73 der Datei compiler.h.
#define XMEGA_AU (XMEGA_A1U || XMEGA_A3U || XMEGA_A3BU || XMEGA_A4U) |
AVR XMEGA AU family
Definiert in Zeile 91 der Datei compiler.h.