summaryrefslogtreecommitdiff
path: root/src/portable/chipidea/ci_fs/ci_fs_mcx.h
blob: 425265ccadd7f0b6f92d93b9fc09e14de1f5cfc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * SPDX-FileCopyrightText: Copyright (c) 2023 Ha Thach (tinyusb.org)
 * SPDX-License-Identifier: MIT
 *
 * This file is part of the TinyUSB stack.
 */

#ifndef _CI_FS_MCX_H
#define _CI_FS_MCX_H

#include "fsl_device_registers.h"

#if CFG_TUSB_MCU == OPT_MCU_MCXN9
  #define CI_FS_REG(_port)  ((ci_fs_regs_t*) USBFS0_BASE)
  #define CIFS_IRQN 				USB0_FS_IRQn

#elif CFG_TUSB_MCU == OPT_MCU_MCXA15
  #define CI_FS_REG(_port)  ((ci_fs_regs_t*) USB0_BASE)
  #define CIFS_IRQN         USB0_IRQn

#else
  #error "MCU is not supported"
#endif

#define CI_REG              CI_FS_REG(0)

void dcd_int_enable(uint8_t rhport) {
  (void) rhport;
  NVIC_EnableIRQ(CIFS_IRQN);
}

void dcd_int_disable(uint8_t rhport) {
  (void) rhport;
  NVIC_DisableIRQ(CIFS_IRQN);
}

#endif