27#ifndef _CI_HS_IMXRT_H_
28#define _CI_HS_IMXRT_H_
30#include "fsl_device_registers.h"
32#if !defined(USB1_BASE) && defined(USB_OTG1_BASE)
33#define USB1_BASE USB_OTG1_BASE
36#if !defined(USB2_BASE) && defined(USB_OTG2_BASE)
37#define USB2_BASE USB_OTG2_BASE
41#if defined(MIMXRT1042_SERIES)
42#define USB_OTG1_IRQn USB_OTG_IRQn
48 #if FSL_FEATURE_SOC_USBHS_COUNT == 1
49 { .reg_base = USB_BASE , .irqnum = USB_OTG1_IRQn }
51 { .reg_base = USB1_BASE, .irqnum = USB_OTG1_IRQn},
52 { .reg_base = USB2_BASE, .irqnum = USB_OTG2_IRQn}
56#define CI_HS_REG(_port) ((ci_hs_regs_t*) _ci_controller[_port].reg_base)
59#define CI_DCD_INT_ENABLE(_p) NVIC_EnableIRQ (_ci_controller[_p].irqnum)
60#define CI_DCD_INT_DISABLE(_p) NVIC_DisableIRQ(_ci_controller[_p].irqnum)
63#define CI_HCD_INT_ENABLE(_p) NVIC_EnableIRQ (_ci_controller[_p].irqnum)
64#define CI_HCD_INT_DISABLE(_p) NVIC_DisableIRQ(_ci_controller[_p].irqnum)
67TU_ATTR_ALWAYS_INLINE
static inline bool imxrt_is_cache_mem(uintptr_t addr) {
68 return !(0x20000000 <= addr && addr < 0x20100000);
71TU_ATTR_ALWAYS_INLINE
static inline bool imxrt_dcache_clean(
void const* addr, uint32_t data_size) {
72 const uintptr_t addr32 = (uintptr_t) addr;
73 if (imxrt_is_cache_mem(addr32)) {
74 TU_ASSERT(tu_is_aligned32(addr32));
80TU_ATTR_ALWAYS_INLINE
static inline bool imxrt_dcache_invalidate(
void const* addr, uint32_t data_size) {
81 const uintptr_t addr32 = (uintptr_t) addr;
82 if (imxrt_is_cache_mem(addr32)) {
86 TU_ASSERT(tu_is_aligned32(addr32));
92TU_ATTR_ALWAYS_INLINE
static inline bool imxrt_dcache_clean_invalidate(
void const* addr, uint32_t data_size) {
93 const uintptr_t addr32 = (uintptr_t) addr;
94 if (imxrt_is_cache_mem(addr32)) {
95 TU_ASSERT(tu_is_aligned32(addr32));
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr(uint32_t *addr, int32_t dsize)
D-Cache Clean and Invalidate by address.
Definition core_cm7.h:2572
__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr(void *addr, int32_t dsize)
D-Cache Invalidate by address.
Definition core_cm7.h:2512
__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr(uint32_t *addr, int32_t dsize)
D-Cache Clean by address.
Definition core_cm7.h:2542
Definition ci_hs_type.h:143