update nuc121/125

This commit is contained in:
hathach
2025-10-15 12:49:36 +07:00
parent 9bd3622fc7
commit 0d690c8b80
11 changed files with 184 additions and 34 deletions

View File

@ -382,6 +382,7 @@
//--------------------------------------------------------------------+
#elif TU_CHECK_MCU(OPT_MCU_NUC121, OPT_MCU_NUC126)
#define TUP_DCD_ENDPOINT_MAX 8
#define TUP_DCD_EDPT_ISO_ALLOC
#elif TU_CHECK_MCU(OPT_MCU_NUC120)
#define TUP_DCD_ENDPOINT_MAX 6

View File

@ -293,8 +293,9 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
/* construct USB Configuration Register value and then write it */
uint32_t cfg = tu_edpt_number(p_endpoint_desc->bEndpointAddress);
cfg |= (TUSB_DIR_IN == dir) ? USBD_CFG_EPMODE_IN : USBD_CFG_EPMODE_OUT;
if (TUSB_XFER_ISOCHRONOUS == type)
if (TUSB_XFER_ISOCHRONOUS == type) {
cfg |= USBD_CFG_TYPE_ISO;
}
ep->CFG = cfg;
/* make a note of the endpoint size */
@ -303,6 +304,19 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
return true;
}
bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet_size) {
(void) rhport;
(void) ep_addr;
(void) largest_packet_size;
return false; // TODO not implemented yet
}
bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const *desc_ep) {
(void) rhport;
(void) desc_ep;
return false; // TODO not implemented yet
}
void dcd_edpt_close_all (uint8_t rhport)
{
(void) rhport;