Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Functions

bool arch_is_instr_mem (const void *addr, size_t len)
 Check if region is in instruction memory.
void * arch_memset_instr (void *buf, int c, size_t n)
 Memset buffer in instruction memory.
void * arch_memcpy_to_instr (void *d, const void *s, size_t n)
 Memcpy buffer from data memory to instruction memory.
void * arch_memcpy_from_instr (void *d, const void *s, size_t n)
 Memcpy buffer from instruction memory to data memory.

Detailed Description

Function Documentation

◆ arch_is_instr_mem()

bool arch_is_instr_mem ( const void * addr,
size_t len )

#include <zephyr/arch/common/instr_mem.h>

Check if region is in instruction memory.

Check if the given address range is in instruction memory. For non-Harvard architectures, this function will always return true. For Harvard architectures, if it cannot be determined whether the region is in instruction memory, e.g. due to missing Devicetree information, this function should return false.

Parameters
addrStarting address of the region
lenLength of the region in bytes
Returns
true if architecture non-Harvard or region in instruction memory, false otherwise

◆ arch_memcpy_from_instr()

void * arch_memcpy_from_instr ( void * d,
const void * s,
size_t n )

#include <zephyr/arch/common/instr_mem.h>

Memcpy buffer from instruction memory to data memory.

Memcpy used to copy buffer from instruction memory to data memory.

Parameters
dDestination buffer
sSource buffer
nNumber of bytes to copy
Returns
the provided destination buffer pointer, or NULL on error

◆ arch_memcpy_to_instr()

void * arch_memcpy_to_instr ( void * d,
const void * s,
size_t n )

#include <zephyr/arch/common/instr_mem.h>

Memcpy buffer from data memory to instruction memory.

Memcpy used to copy buffer from data memory to instruction memory.

Parameters
dDestination buffer
sSource buffer
nNumber of bytes to copy
Returns
the provided destination buffer pointer, or NULL on error

◆ arch_memset_instr()

void * arch_memset_instr ( void * buf,
int c,
size_t n )

#include <zephyr/arch/common/instr_mem.h>

Memset buffer in instruction memory.

Memset buffer in instruction memory.

Parameters
bufBuffer to memset
cValue to set
nNumber of bytes to set
Returns
the provided buffer pointer, or NULL on error