tinyusb/src/portable/nxp/lpc17_40/dcd_lpc17_40.c
static void dd_complete_isr(uint8_t rhport, uint8_t ep_id)
{
  dma_desc_t* const dd = &_dcd.dd[ep_id];
  uint8_t result = (dd->status == DD_STATUS_NORMAL || dd->status == DD_STATUS_DATA_UNDERUN) ? XFER_RESULT_SUCCESS : XFER_RESULT_FAILED;
  uint8_t const ep_addr = (ep_id / 2) | ((ep_id & 0x01) ? TUSB_DIR_IN_MASK : 0);

  dcd_event_xfer_complete(rhport, ep_addr, dd->present_count, result, true);
}
// Helper to complete a DMA descriptor for non-control transfer
Helper to complete a DMA descriptor for non-control transfer
Helper to complete a DMA descriptor for non - control transfer
static void dd_complete_isr(uint8_t rhport, uint8_t ep_id)
{
  dma_desc_t* const dd = &_dcd.dd[ep_id];
  uint8_t result = (dd->status == DD_STATUS_NORMAL || dd->status == DD_STATUS_DATA_UNDERUN) ? XFER_RESULT_SUCCESS : XFER_RESULT_FAILED;
  uint8_t const ep_addr = (ep_id / 2) | ((ep_id & 0x01) ? TUSB_DIR_IN_MASK : 0);
  dcd_event_xfer_complete(rhport, ep_addr, dd->present_count, result, true);
}
static void dd_complete_isr ( uint8_t rhport , uint8_t ep_id ) { dma_desc_t * const dd = & _dcd . dd [ ep_id ] ; uint8_t result = ( dd -> status == DD_STATUS_NORMAL || dd -> status == DD_STATUS_DATA_UNDERUN ) ? XFER_RESULT_SUCCESS : XFER_RESULT_FAILED ; uint8_t const ep_addr = ( ep_id / 2 ) | ( ( ep_id & 0x01 ) ? TUSB_DIR_IN_MASK : 0 ) ; dcd_event_xfer_complete ( rhport , ep_addr , dd -> present_count , result , true ) ; }
Helper to complete a DMA descriptor for non-control transfer
Helper to complete a DMA descriptor for non - control transfer