fsl_dmamux.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Freescale Semiconductor, Inc.
3  * Copyright 2016-2017 NXP
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #include "fsl_dmamux.h"
10 
11 /*******************************************************************************
12  * Definitions
13  ******************************************************************************/
14 
15 /* Component ID definition, used by tools. */
16 #ifndef FSL_COMPONENT_ID
17 #define FSL_COMPONENT_ID "platform.drivers.dmamux"
18 #endif
19 
20 /*******************************************************************************
21  * Prototypes
22  ******************************************************************************/
23 
29 static uint32_t DMAMUX_GetInstance(DMAMUX_Type *base);
30 
31 /*******************************************************************************
32  * Variables
33  ******************************************************************************/
34 
37 
38 #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
39 
41 #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
42 
43 /*******************************************************************************
44  * Code
45  ******************************************************************************/
46 static uint32_t DMAMUX_GetInstance(DMAMUX_Type *base)
47 {
48  uint32_t instance;
49 
50  /* Find the instance index from base address mappings. */
51  for (instance = 0; instance < ARRAY_SIZE(s_dmamuxBases); instance++)
52  {
53  if (s_dmamuxBases[instance] == base)
54  {
55  break;
56  }
57  }
58 
59  assert(instance < ARRAY_SIZE(s_dmamuxBases));
60 
61  return instance;
62 }
63 
73 {
74 #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
76 #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
77 }
78 
87 {
88 #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
90 #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
91 }
DMAMUX_Deinit
void DMAMUX_Deinit(DMAMUX_Type *base)
Deinitializes the DMAMUX peripheral.
Definition: fsl_dmamux.c:86
s_dmamuxBases
static DMAMUX_Type *const s_dmamuxBases[]
Array to map DMAMUX instance number to base pointer.
Definition: fsl_dmamux.c:36
s_dmamuxClockName
static const clock_ip_name_t s_dmamuxClockName[]
Array to map DMAMUX instance number to clock name.
Definition: fsl_dmamux.c:40
DMAMUX_CLOCKS
#define DMAMUX_CLOCKS
Clock ip name array for DMAMUX_CLOCKS.
Definition: fsl_clock.h:181
fsl_dmamux.h
ARRAY_SIZE
#define ARRAY_SIZE(x)
Computes the number of elements in an array.
Definition: fsl_common.h:211
DMAMUX_BASE_PTRS
#define DMAMUX_BASE_PTRS
Definition: MIMXRT1052.h:15121
DMAMUX_Init
void DMAMUX_Init(DMAMUX_Type *base)
Initializes the DMAMUX peripheral.
Definition: fsl_dmamux.c:72
CLOCK_EnableClock
static void CLOCK_EnableClock(clock_ip_name_t name)
Enable the clock for specific IP.
Definition: fsl_clock.h:1059
DMAMUX_GetInstance
static uint32_t DMAMUX_GetInstance(DMAMUX_Type *base)
Get instance number for DMAMUX.
Definition: fsl_dmamux.c:46
CLOCK_DisableClock
static void CLOCK_DisableClock(clock_ip_name_t name)
Disable the clock for specific IP.
Definition: fsl_clock.h:1069
DMAMUX_Type
Definition: MIMXRT1052.h:15060
clock_ip_name_t
enum _clock_ip_name clock_ip_name_t
CCM CCGR gate control for each module independently.


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:13:56