SAM macro SAM-ADDR()

From SoOS

Jump to: navigation, search

Contents

[edit] Name

__SAM_ADDR__ - Calculate the memory access address

[edit] Synopsis

#include <sam.h>
 
__SAM_ADDR__(x, y)

[edit] Description

The __SAM_ADDR__() macro calculates the memory address to read or to write, given the memory address to a registered region of memory x and the pointer differential y returned by the function SAM_Memory_speculative_write_prepare(). In case of not accessing memory with speculative write, this macro is not needed or it can be used with an y value of 0.

[edit] Return value

See DESCRIPTION above.

[edit] Errors

None, assumes correct input parameters.

[edit] Examples

Example 4 - Executing speculatively, flashing back, and speculative writing

[edit] See also

SAM_Memory_speculative_read(), SAM_Memory_speculative_write_prepare(), SAM_Memory_write_prepare(), SAM_Memory_write(), <sam.h>.