aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT685S/drivers/fsl_dsp.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT685S/drivers/fsl_dsp.h')
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT685S/drivers/fsl_dsp.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT685S/drivers/fsl_dsp.h b/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT685S/drivers/fsl_dsp.h
new file mode 100644
index 000000000..f858146cf
--- /dev/null
+++ b/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT685S/drivers/fsl_dsp.h
@@ -0,0 +1,96 @@
1/*
2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
3 * Copyright 2019 NXP
4 * All rights reserved.
5 *
6 * SPDX-License-Identifier: BS
7 */
8#ifndef _FSL_DSP_H_
9#define _FSL_DSP_H_
10
11#include <stdint.h>
12#include "fsl_device_registers.h"
13
14/*!
15 * @addtogroup dsp
16 * @{
17 */
18
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
23/*! @name Driver version */
24/*@{*/
25/*! @brief reset driver version 2.1.1. */
26#define FSL_DSP_DRIVER_VERSION (MAKE_VERSION(2, 1, 1))
27/*@}*/
28
29/*!
30 * @brief Structure for DSP copy image to destination address
31 *
32 * Defines start and destination address for copying image with given size.
33 */
34typedef struct _dsp_copy_image
35{
36 uint32_t *srcAddr;
37 uint32_t *destAddr;
38 uint32_t size;
39} dsp_copy_image_t;
40
41/*******************************************************************************
42 * API
43 ******************************************************************************/
44#if defined(__cplusplus)
45extern "C" {
46#endif
47
48/*!
49 * @brief Initializing DSP core.
50 *
51 * Power up DSP TCM
52 * Enable DSP clock
53 * Reset DSP peripheral
54 */
55void DSP_Init(void);
56/*!
57 * @brief Deinit DSP core.
58 *
59 * Power down DSP TCM
60 * Disable DSP clock
61 * Set DSP peripheral reset
62 */
63void DSP_Deinit(void);
64
65/*!
66 * @brief Copy DSP image to destination address.
67 *
68 * Copy DSP image from source address to destination address with given size.
69 *
70 * @param dspCopyImage Structure contains information for DSP copy image to destination address.
71 */
72void DSP_CopyImage(dsp_copy_image_t *dspCopyImage);
73
74/*!
75 * @brief Start DSP core.
76 */
77static inline void DSP_Start(void)
78{
79 SYSCTL0->DSPSTALL = 0x0;
80}
81
82/*!
83 * @brief Stop DSP core.
84 */
85static inline void DSP_Stop(void)
86{
87 SYSCTL0->DSPSTALL = 0x1;
88}
89
90#if defined(__cplusplus)
91}
92#endif
93
94/*! @} */
95
96#endif /* _FSL_RESET_H_ */