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)
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;
75 SCB_CleanDCache_by_Addr((uint32_t *) addr32, (int32_t) data_size);
81 const uintptr_t addr32 = (uintptr_t) addr;
87 SCB_InvalidateDCache_by_Addr((
void*) addr32, (int32_t) data_size);
93 const uintptr_t addr32 = (uintptr_t) addr;
96 SCB_CleanInvalidateDCache_by_Addr((uint32_t *) addr32, (int32_t) data_size);
static TU_ATTR_ALWAYS_INLINE bool imxrt_dcache_invalidate(void const *addr, uint32_t data_size)
static TU_ATTR_ALWAYS_INLINE bool imxrt_dcache_clean(void const *addr, uint32_t data_size)
static TU_ATTR_ALWAYS_INLINE bool imxrt_dcache_clean_invalidate(void const *addr, uint32_t data_size)
static TU_ATTR_ALWAYS_INLINE bool imxrt_is_cache_mem(uintptr_t addr)
static const ci_hs_controller_t _ci_controller[]
static TU_ATTR_ALWAYS_INLINE bool tu_is_aligned32(uint32_t value)