Compiler abstraction layer and code utilities for 32-bit AVR.
This module provides various abstraction layers and utilities to make code compatible between different compilers.
|
Tagging a function as deprecated will produce a warning when and only when the function is called.
Usage is to add the DEPRECATED symbol before the function definition. E.g.: DEPRECATED uint8_t some_deprecated_function (void) { ... }
- Note
- Only supported by GCC 3.1 and above, no IAR support
|
#define | __DEPRECATED__ __attribute__((__deprecated__)) |
|
#define __DEPRECATED__ __attribute__((__deprecated__)) |
#define barrier |
( |
| ) |
asm volatile("" ::: "memory") |
#define COMPILER_ALIGNED |
( |
|
a | ) |
__attribute__((__aligned__(a))) |
Set default alignment for subsequent struct and union definitions.
Set maximum alignment for subsequent struct and union definitions to alignment.
#define COMPILER_PRAGMA |
( |
|
arg | ) |
_Pragma(#arg) |
Emit the compiler pragma arg.
- Parameters
-
arg | The pragma directive as it would appear after #pragma (i.e. not stringified). |
#define COMPILER_WORD_ALIGNED __attribute__((__aligned__(4))) |
Set word-aligned boundary.
#define Set_system_register |
( |
|
reg, |
|
|
|
val |
|
) |
| sysreg_write(reg, val) |
#define sysreg_read |
( |
|
reg | ) |
__builtin_mfsr(reg) |
Get value of system register.
- Parameters
-
reg | Address of the system register of which to get the value. |
- Returns
- Value of system register reg.
Referenced by cpu_irq_save().
#define sysreg_write |
( |
|
reg, |
|
|
|
val |
|
) |
| __builtin_mtsr(reg, val) |
Set value of system register.
- Parameters
-
reg | Address of the system register of which to set the value. |
val | Value to set the system register reg to. |
#define UNUSED |
( |
|
v | ) |
(void)(v) |
Marking v as a unused parameter or value.
Referenced by mem_name(), mem_removal(), mem_unload(), sd_mmc_is_write_protected(), sd_mmc_removal(), sd_mmc_spi_adtc_start(), sd_mmc_spi_get_bus_width(), sd_mmc_spi_get_response_128(), sd_mmc_spi_select_device(), sleepmgr_lock_mode(), sleepmgr_unlock_mode(), udi_msc_cbw_received(), udi_msc_csw_sent(), udi_msc_data_sent(), and udi_msc_trans_ack().
#define unused |
( |
|
v | ) |
do { (void)(v); } while(0) |
Marking v as a unused parameter or value.