See Gnu for detailed documentation. More...
#include <stdarg.h>
#include "hal/micro/generic/compiler/platform-common.h"
Go to the source code of this file.
Defines | |
#define | _HAL_USE_COMMON_PGM_ |
Use the Master Program Memory Declarations from platform-common.h. | |
#define | _HAL_USE_COMMON_MEMUTILS_ |
Use the C Standard Library Memory Utilities from platform-common.h. | |
#define | PLATCOMMONOKTOINCLUDE |
Include platform-common.h last to pick up defaults and common definitions. | |
Portable segment names | |
#define | __NO_INIT__ ".noinit" |
Portable segment names. | |
#define | __INTVEC__ ".intvec" |
#define | __CSTACK__ "CSTACK" |
#define | __DATA_INIT__ ".data_init" |
#define | __DATA__ ".data" |
#define | __BSS__ ".bss" |
#define | __CONST__ ".rodata" |
#define | __TEXT__ ".text" |
#define | __TEXTRW_INIT__ ".textrw_init" |
#define | __TEXTRW__ ".textrw" |
#define | __FAT__ "FAT" |
#define | __NVM__ "NVM" |
Typedefs | |
Master Variable Types | |
typedef unsigned char | boolean |
A typedef to make the size of the variable explicitly known. | |
typedef unsigned char | int8u |
typedef signed char | int8s |
typedef unsigned short | int16u |
typedef signed short | int16s |
typedef unsigned int | int32u |
typedef signed int | int32s |
typedef unsigned int | PointerType |
Functions | |
External Declarations | |
int | abs (int I) |
Returns the absolute value of I (also called the magnitude of I). | |
Miscellaneous Macros | |
| |
#define | BIGENDIAN_CPU FALSE |
A convenient method for code to know what endiannes processor it is running on. | |
#define | NO_STRIPPING |
A friendlier name for the compiler's intrinsic for not stripping. | |
#define | __no_init |
#define | EEPROM errorerror |
A friendlier name for the compiler's intrinsic for eeprom reference. | |
#define | __SOURCEFILE__ __FILE__ |
The __SOURCEFILE__ macro is used by asserts to list the filename if it isn't otherwise defined, set it to the compiler intrinsic which specifies the whole filename and path of the sourcefile. | |
#define | assert(condition) do { if (! (condition)) {while (1); }} while(0) |
#define | __delay_cycles(x) please_use_halCommonDelayMicroseconds_instead_of_delay_cycles |
__delay_cycles() is an intrinsic IAR call; however, we have explicity disallowed it since it is too specific to the system clock. | |
#define | DEBUG_LEVEL FULL_DEBUG |
Set debug level based on whether or DEBUG is defined. | |
#define | APPLICATION_IMAGE_START ((u32) &__ApplicationFlashStart) |
Set the application start and end address. | |
#define | APPLICATION_IMAGE_END ((u32) &__ApplicationFlashEnd) |
#define | halResetWatchdog() halInternalResetWatchDog() |
#define | UNUSED |
Define __attribute__ to nothing since it isn't handled by IAR. | |
#define | SIGNED_ENUM |
Some platforms need to cast enum values that have the high bit set. | |
#define | STACK_FILL_VALUE 0xCDCDCDCD |
Define the magic value that is interpreted by IAR C-SPY's Stack View. | |
#define | RAMFUNC __ramfunc |
Define a generic RAM function identifier to a compiler specific one. | |
#define | NO_OPERATION() __no_operation() |
Define a generic no operation identifier to a compiler specific one. | |
#define | SET_REG_FIELD(reg, field, value) |
A convenience macro that makes it easy to change the field of a register to any value. | |
#define | simulatedTimePasses() |
Stub for code not running in simulation. | |
#define | simulatedTimePassesMs(x) |
Stub for code not running in simulation. | |
#define | simulatedSerialTimePasses() |
Stub for code not running in simulation. | |
#define | _HAL_USE_COMMON_DIVMOD_ |
Use the Divide and Modulus Operations from platform-common.h. | |
#define | VAR_AT_SEGMENT(__variableDeclaration, __segmentName) __variableDeclaration __attribute__ ((section (__segmentName))) |
Provide a portable way to specify the segment where a variable lives. | |
#define | ALIGN_VAR(__variableDeclaration, alignment) __variableDeclaration __attribute__ ((aligned(alignment))) |
char | __ApplicationFlashStart |
char | __ApplicationFlashEnd |
void | halInternalResetWatchDog (void) |
Macro to reset the watchdog timer. | |
Global Interrupt Manipulation Macros | |
Note: The special purpose BASEPRI register is used to enable and disable interrupts while permitting faults. When BASEPRI is set to 1 no interrupts can trigger. The configurable faults (usage, memory management, and bus faults) can trigger if enabled as well as the always-enabled exceptions (reset, NMI and hard fault). When BASEPRI is set to 0, it is disabled, so any interrupt can triggger if its priority is higher than the current priority. | |
#define | ATOMIC_LITE(blah) ATOMIC(blah) |
#define | DECLARE_INTERRUPT_STATE_LITE DECLARE_INTERRUPT_STATE |
#define | DISABLE_INTERRUPTS_LITE() DISABLE_INTERRUPTS() |
#define | RESTORE_INTERRUPTS_LITE() RESTORE_INTERRUPTS() |
#define | DECLARE_INTERRUPT_STATE int8u _emIsrState |
This macro should be called in the local variable declarations section of any function which calls DISABLE_INTERRUPTS() or RESTORE_INTERRUPTS(). | |
#define | DISABLE_INTERRUPTS() |
Disable interrupts, saving the previous state so it can be later restored with RESTORE_INTERRUPTS(). | |
#define | RESTORE_INTERRUPTS() |
Restore the global interrupt state previously saved by DISABLE_INTERRUPTS(). | |
#define | INTERRUPTS_ON() |
Enable global interrupts without regard to the current or previous state. | |
#define | INTERRUPTS_OFF() |
Disable global interrupts without regard to the current or previous state. | |
#define | INTERRUPTS_ARE_OFF() ( _basePriIsDisabled() ) |
#define | INTERRUPTS_WERE_ON() (_emIsrState == 0) |
#define | ATOMIC(blah) |
A block of code may be made atomic by wrapping it with this macro. | |
#define | HANDLE_PENDING_INTERRUPTS() |
Allows any pending interrupts to be executed. | |
#define | SET_BASE_PRIORITY_LEVEL(basepri) |
Sets the base priority mask (BASEPRI) to the value passed, bit shifted up by PRIGROUP_POSITION+1. | |
int8u | _readBasePri (void) |
void | _writeBasePri (int8u priority) |
void | _enableBasePri (void) |
int8u | _disableBasePri (void) |
boolean | _basePriIsDisabled (void) |
void | _setPriMask (void) |
void | _clearPriMask (void) |
See Gnu for detailed documentation.
Definition in file gnu.h.