![]() |
SWARM-Bot Firmware
v1.0
Mobile robot OS - Embedded C/C++
|
Commonly used includes, types and macros. More...
#include <stdbool.h>#include <stdint.h>#include <stddef.h>#include <stdlib.h>#include <parts.h>#include "interrupt.h"#include "progmem.h"Go to the source code of this file.
Macros | |
| #define | UNUSED(v) (void)(v) |
| Marking v as a unused parameter or value. More... | |
| #define | unused(v) do { (void)(v); } while(0) |
| Marking v as a unused parameter or value. More... | |
| #define | barrier() asm ("") |
| Memory barrier. More... | |
| #define | COMPILER_PACK_RESET(alignment) |
| #define | COMPILER_PACK_SET(alignment) |
| #define | Assert(expr) ((void) 0) |
| This macro is used to test fatal errors. More... | |
| #define | CMD_ID_OCTET (0) |
| #define | CPU_ENDIAN_TO_LE16(x) (x) |
| #define | CPU_ENDIAN_TO_LE32(x) (x) |
| #define | CPU_ENDIAN_TO_LE64(x) (x) |
| #define | LE16_TO_CPU_ENDIAN(x) (x) |
| #define | LE32_TO_CPU_ENDIAN(x) (x) |
| #define | LE64_TO_CPU_ENDIAN(x) (x) |
| #define | CLE16_TO_CPU_ENDIAN(x) (x) |
| #define | CLE32_TO_CPU_ENDIAN(x) (x) |
| #define | CLE64_TO_CPU_ENDIAN(x) (x) |
| #define | CCPU_ENDIAN_TO_LE16(x) (x) |
| #define | CCPU_ENDIAN_TO_LE32(x) (x) |
| #define | CCPU_ENDIAN_TO_LE64(x) (x) |
| #define | MEMCPY_ENDIAN memcpy |
| #define | PGM_READ_BLOCK(dst, src, len) memcpy_P((dst), (src), (len)) |
| #define | Swap16(u16) |
| Toggles the endianism of u16 (by swapping its bytes). More... | |
| #define | Swap32(u32) |
| Toggles the endianism of u32 (by swapping its bytes). More... | |
| #define | Swap64(u64) |
| Toggles the endianism of u64 (by swapping its bytes). More... | |
MCU Endianism Handling | |
| #define | MSB(u16) (((uint8_t* )&u16)[1]) |
| #define | LSB(u16) (((uint8_t* )&u16)[0]) |
Typedefs | |
| typedef uint8_t | U8 |
| 8-bit unsigned integer. More... | |
| typedef uint16_t | U16 |
| 16-bit unsigned integer. More... | |
| typedef uint32_t | U32 |
| 32-bit unsigned integer. More... | |
| typedef unsigned long long int | U64 |
| 64-bit unsigned integer. More... | |
Commonly used includes, types and macros.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
\asf_license_start
Definition in file compiler.h.
| #define Assert | ( | expr | ) | ((void) 0) |
This macro is used to test fatal errors.
The macro tests if the expression is false. If it is, a fatal error is detected and the application hangs up. If TEST_SUITE_DEFINE_ASSERT_MACRO is defined, a unit test version of the macro is used, to allow execution of further tests after a false expression.
| expr | Expression to evaluate and supposed to be nonzero. |
| #define barrier | ( | ) | asm ("") |
Memory barrier.
| #define Swap16 | ( | u16 | ) |
Toggles the endianism of u16 (by swapping its bytes).
| u16 | U16 of which to toggle the endianism. |
| #define Swap32 | ( | u32 | ) |
Toggles the endianism of u32 (by swapping its bytes).
| u32 | U32 of which to toggle the endianism. |
| #define Swap64 | ( | u64 | ) |
Toggles the endianism of u64 (by swapping its bytes).
| u64 | U64 of which to toggle the endianism. |
| #define UNUSED | ( | v | ) | (void)(v) |
Marking v as a unused parameter or value.
| #define unused | ( | v | ) | do { (void)(v); } while(0) |
Marking v as a unused parameter or value.
| typedef uint16_t U16 |
16-bit unsigned integer.
| typedef uint32_t U32 |
32-bit unsigned integer.
| typedef unsigned long long int U64 |
64-bit unsigned integer.
| typedef uint8_t U8 |
8-bit unsigned integer.