/* * Copyright 1997-2016 Freescale Semiconductor, Inc. * Copyright 2016-2022 NXP * * SPDX-License-Identifier: BSD-3-Clause */ /*! * @file S32K148_DMAMUX.h * @version 1.1 * @date 2022-02-02 * @brief Peripheral Access Layer for S32K148_DMAMUX * * This file contains register definitions and macros for easy access to their * bit fields. * * This file assumes LITTLE endian system. */ /** * @page misra_violations MISRA-C:2012 violations * * @section [global] * Violates MISRA 2012 Advisory Rule 2.3, local typedef not referenced * The SoC header defines typedef for all modules. * * @section [global] * Violates MISRA 2012 Advisory Rule 2.5, local macro not referenced * The SoC header defines macros for all modules and registers. * * @section [global] * Violates MISRA 2012 Advisory Directive 4.9, Function-like macro * These are generated macros used for accessing the bit-fields from registers. * * @section [global] * Violates MISRA 2012 Required Rule 5.1, identifier clash * The supported compilers use more than 31 significant characters for identifiers. * * @section [global] * Violates MISRA 2012 Required Rule 5.2, identifier clash * The supported compilers use more than 31 significant characters for identifiers. * * @section [global] * Violates MISRA 2012 Required Rule 5.4, identifier clash * The supported compilers use more than 31 significant characters for identifiers. * * @section [global] * Violates MISRA 2012 Required Rule 5.5, identifier clash * The supported compilers use more than 31 significant characters for identifiers. * * @section [global] * Violates MISRA 2012 Required Rule 21.1, defined macro '__I' is reserved to the compiler * This type qualifier is needed to ensure correct I/O access and addressing. */ /* Prevention from multiple including the same memory map */ #if !defined(S32K148_DMAMUX_H_) /* Check if memory map has not been already included */ #define S32K148_DMAMUX_H_ #include "S32K148_COMMON.h" /* ---------------------------------------------------------------------------- -- DMAMUX Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup DMAMUX_Peripheral_Access_Layer DMAMUX Peripheral Access Layer * @{ */ /** DMAMUX - Size of Registers Arrays */ #define DMAMUX_CHCFG_COUNT 16u /** DMAMUX - Register Layout Typedef */ typedef struct { __IO uint8_t CHCFG[DMAMUX_CHCFG_COUNT]; /**< Channel Configuration register, array offset: 0x0, array step: 0x1 */ } DMAMUX_Type, *DMAMUX_MemMapPtr; /** Number of instances of the DMAMUX module. */ #define DMAMUX_INSTANCE_COUNT (1u) /* DMAMUX - Peripheral instance base addresses */ /** Peripheral DMAMUX base address */ #define IP_DMAMUX_BASE (0x40021000u) /** Peripheral DMAMUX base pointer */ #define IP_DMAMUX ((DMAMUX_Type *)IP_DMAMUX_BASE) /** Array initializer of DMAMUX peripheral base addresses */ #define IP_DMAMUX_BASE_ADDRS { IP_DMAMUX_BASE } /** Array initializer of DMAMUX peripheral base pointers */ #define IP_DMAMUX_BASE_PTRS { IP_DMAMUX } /* ---------------------------------------------------------------------------- -- DMAMUX Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup DMAMUX_Register_Masks DMAMUX Register Masks * @{ */ /*! @name CHCFG - Channel Configuration register */ /*! @{ */ #define DMAMUX_CHCFG_SOURCE_MASK (0x3FU) #define DMAMUX_CHCFG_SOURCE_SHIFT (0U) #define DMAMUX_CHCFG_SOURCE_WIDTH (6U) #define DMAMUX_CHCFG_SOURCE(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_SOURCE_SHIFT)) & DMAMUX_CHCFG_SOURCE_MASK) #define DMAMUX_CHCFG_TRIG_MASK (0x40U) #define DMAMUX_CHCFG_TRIG_SHIFT (6U) #define DMAMUX_CHCFG_TRIG_WIDTH (1U) #define DMAMUX_CHCFG_TRIG(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_TRIG_SHIFT)) & DMAMUX_CHCFG_TRIG_MASK) #define DMAMUX_CHCFG_ENBL_MASK (0x80U) #define DMAMUX_CHCFG_ENBL_SHIFT (7U) #define DMAMUX_CHCFG_ENBL_WIDTH (1U) #define DMAMUX_CHCFG_ENBL(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_ENBL_SHIFT)) & DMAMUX_CHCFG_ENBL_MASK) /*! @} */ /*! * @} */ /* end of group DMAMUX_Register_Masks */ /*! * @} */ /* end of group DMAMUX_Peripheral_Access_Layer */ #endif /* #if !defined(S32K148_DMAMUX_H_) */