Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
memc.h File Reference

Main header file for Memory Controller (MEMC) driver API. More...

#include <zephyr/types.h>
#include <stddef.h>
#include <zephyr/device.h>
#include <string.h>
#include <zephyr/syscalls/memc.h>

Go to the source code of this file.

Data Structures

struct  memc_driver_api
  Driver Operations MEMC driver operations More...

Typedefs

typedef int(* memc_api_read) (const struct device *dev, uint32_t addr, uint8_t *data, size_t len)
 Callback API for reading from external memory.
typedef int(* memc_api_write) (const struct device *dev, uint32_t addr, const uint8_t *data, size_t len)
 Callback API for writing to external memory.
typedef int(* memc_api_get_size) (const struct device *dev, uint64_t *size)
 Callback API for getting the size of external memory.
typedef int(* memc_api_read_id) (const struct device *dev, uint8_t *id, size_t len)
 Callback API for reading the ID of external memory.
typedef void *(* memc_api_get_mem_base) (const struct device *dev)
 Callback API for getting the base address of external memory.

Functions

int memc_read (const struct device *dev, uint32_t addr, uint8_t *data, size_t len)
 Read data from external memory.
int memc_write (const struct device *dev, uint32_t addr, const uint8_t *data, size_t len)
 Write data to external memory.
static void * memc_get_mem_base (const struct device *dev)
 Get the memory-mapped base address of a MEMC device.
int memc_get_size (const struct device *dev, uint64_t *size)
 Get the size of external memory.
int memc_read_id (const struct device *dev, uint8_t *id, size_t len)
 Read the ID of external memory.

Detailed Description

Main header file for Memory Controller (MEMC) driver API.