Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
nxp_rtxxx_dsp_ctrl.h
Go to the documentation of this file.
1/*
2 * Copyright 2025 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include <zephyr/device.h>
9
10#ifndef __NXP_RTXXX_DSP_CTRL_H__
11#define __NXP_RTXXX_DSP_CTRL_H__
12
21
23 const struct device *,
24 const void *,
25 size_t,
27);
28typedef void (*nxp_rtxxx_dsp_ctrl_api_enable)(const struct device *dev);
29typedef void (*nxp_rtxxx_dsp_ctrl_api_disable)(const struct device *dev);
30
36
49 const struct device *dev,
50 const void *base,
51 size_t length,
53)
54{
55 return ((struct nxp_rtxxx_dsp_ctrl_api *)dev->api)
56 ->load_section(dev, base, length, section);
57}
58
64static inline void nxp_rtxxx_dsp_ctrl_enable(const struct device *dev)
65{
66 ((struct nxp_rtxxx_dsp_ctrl_api *)dev->api)->enable(dev);
67}
68
74static inline void nxp_rtxxx_dsp_ctrl_disable(const struct device *dev)
75{
76 ((struct nxp_rtxxx_dsp_ctrl_api *)dev->api)->disable(dev);
77}
78
79#endif
nxp_rtxxx_dsp_ctrl_section_type
Describes an image section type selection.
Definition nxp_rtxxx_dsp_ctrl.h:16
@ NXP_RTXXX_DSP_CTRL_SECTION_RESET
Definition nxp_rtxxx_dsp_ctrl.h:17
@ NXP_RTXXX_DSP_CTRL_SECTION_DATA
Definition nxp_rtxxx_dsp_ctrl.h:19
@ NXP_RTXXX_DSP_CTRL_SECTION_TEXT
Definition nxp_rtxxx_dsp_ctrl.h:18
void(* nxp_rtxxx_dsp_ctrl_api_disable)(const struct device *dev)
Definition nxp_rtxxx_dsp_ctrl.h:29
static void nxp_rtxxx_dsp_ctrl_disable(const struct device *dev)
Stops (stalls) the DSP.
Definition nxp_rtxxx_dsp_ctrl.h:74
void(* nxp_rtxxx_dsp_ctrl_api_enable)(const struct device *dev)
Definition nxp_rtxxx_dsp_ctrl.h:28
static void nxp_rtxxx_dsp_ctrl_enable(const struct device *dev)
Starts (unstalls) the DSP.
Definition nxp_rtxxx_dsp_ctrl.h:64
int(* nxp_rtxxx_dsp_ctrl_api_load_section)(const struct device *, const void *, size_t, enum nxp_rtxxx_dsp_ctrl_section_type)
Definition nxp_rtxxx_dsp_ctrl.h:22
static int nxp_rtxxx_dsp_ctrl_load_section(const struct device *dev, const void *base, size_t length, enum nxp_rtxxx_dsp_ctrl_section_type section)
Loads a specified image representing a specified section to a particular region in the DSP's memory.
Definition nxp_rtxxx_dsp_ctrl.h:48
#define NXP_RTXXX_DSP_REGION_TEXT
Definition nxp_rtxxx_dsp_ctrl.h:11
#define NXP_RTXXX_DSP_REGION_DATA
Definition nxp_rtxxx_dsp_ctrl.h:12
#define NXP_RTXXX_DSP_REGION_RESET
Definition nxp_rtxxx_dsp_ctrl.h:10
Size of off_t must be equal or less than size of size_t
Definition retained_mem.h:28
Runtime device structure (in ROM) per driver instance.
Definition device.h:510
const void * api
Address of the API structure exposed by the device instance.
Definition device.h:516
Definition nxp_rtxxx_dsp_ctrl.h:31
nxp_rtxxx_dsp_ctrl_api_enable enable
Definition nxp_rtxxx_dsp_ctrl.h:33
nxp_rtxxx_dsp_ctrl_api_disable disable
Definition nxp_rtxxx_dsp_ctrl.h:34
nxp_rtxxx_dsp_ctrl_api_load_section load_section
Definition nxp_rtxxx_dsp_ctrl.h:32