minor update bsp

This commit is contained in:
hathach
2024-04-05 20:31:55 +07:00
parent 757a1726e8
commit c97c3418c7
15 changed files with 81 additions and 101 deletions

View File

@@ -30,29 +30,27 @@
#include "fsl_device_registers.h"
#if CFG_TUSB_MCU == OPT_MCU_MCXN9
#define CI_FS_REG(_port) ((ci_fs_regs_t*) USBFS0_BASE)
#define USB0_IRQN USB0_FS_IRQn
#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 USB0_IRQN USB0_IRQn
#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)
#define CI_REG CI_FS_REG(0)
void dcd_int_enable(uint8_t rhport)
{
void dcd_int_enable(uint8_t rhport) {
(void) rhport;
NVIC_EnableIRQ(USB0_IRQN);
NVIC_EnableIRQ(CIFS_IRQN);
}
void dcd_int_disable(uint8_t rhport)
{
void dcd_int_disable(uint8_t rhport) {
(void) rhport;
NVIC_DisableIRQ(USB0_IRQN);
NVIC_DisableIRQ(CIFS_IRQN);
}
#endif

View File

@@ -295,7 +295,7 @@ void dcd_init(uint8_t rhport)
CI_REG->INT_EN = USB_INTEN_USBRSTEN_MASK;
dcd_connect(rhport);
// NVIC_ClearPendingIRQ(USB0_IRQn);
// NVIC_ClearPendingIRQ(CIFS_IRQN);
}
void dcd_set_address(uint8_t rhport, uint8_t dev_addr)