您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ HAL_HCD_HC_SubmitRequest函数代码示例

51自学网 2021-06-01 21:21:10
  C++
这篇教程C++ HAL_HCD_HC_SubmitRequest函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中HAL_HCD_HC_SubmitRequest函数的典型用法代码示例。如果您正苦于以下问题:C++ HAL_HCD_HC_SubmitRequest函数的具体用法?C++ HAL_HCD_HC_SubmitRequest怎么用?C++ HAL_HCD_HC_SubmitRequest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了HAL_HCD_HC_SubmitRequest函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: HAL_HCD_HC_GetType

USB_TYPE USBEndpoint::queueTransfer(){    HCD_HandleTypeDef *hhcd = (HCD_HandleTypeDef *)hced->hhcd;    uint32_t *addr = &((uint32_t *)hhcd->pData)[hced->ch_num];    uint32_t type = HAL_HCD_HC_GetType(hhcd, hced->ch_num);    uint32_t max_size =  HAL_HCD_HC_GetMaxPacket(hhcd, hced->ch_num);    /*  if a packet is queue on disconnected ; no solution for now */    if (state == USB_TYPE_FREE)  {        td_current->state =  USB_TYPE_FREE;        return USB_TYPE_FREE;    }    ep_queue.get(0);    MBED_ASSERT(*addr == 0);    transfer_len =   td_current->size <= max_size ? td_current->size : max_size;    buf_start = (uint8_t *)td_current->currBufPtr;    //Now add this free TD at this end of the queue    state = USB_TYPE_PROCESSING;    /*  one request */    td_current->nextTD = (hcTd *)0;#if defined(MAX_NYET_RETRY)    td_current->retry = 0;#endif    td_current->setup = setup;    *addr = (uint32_t)td_current;    /*  dir /setup is inverted for ST */    /* token is useful only ctrl endpoint */    /*  last parameter is ping ? */    MBED_ASSERT(HAL_HCD_HC_SubmitRequest((HCD_HandleTypeDef *)hced->hhcd, hced->ch_num, dir - 1, type, !setup, (uint8_t *) td_current->currBufPtr, transfer_len, 0) == HAL_OK);    HAL_HCD_EnableInt((HCD_HandleTypeDef *)hced->hhcd, hced->ch_num);    return USB_TYPE_PROCESSING;}
开发者ID:MarceloSalazar,项目名称:mbed-os,代码行数:33,


示例2: USBH_LL_SubmitURB

/** * @brief  USBH_LL_SubmitURB *         Submit a new URB to the low level driver. * @param  phost: Host handle * @param  pipe: Pipe index *         This parameter can be a value from 1 to 15 * @param  direction : Channel number *          This parameter can be one of the these values: *           0 : Output *           1 : Input * @param  ep_type : Endpoint Type *          This parameter can be one of the these values: *            @arg EP_TYPE_CTRL: Control type *            @arg EP_TYPE_ISOC: Isochrounous type *            @arg EP_TYPE_BULK: Bulk type *            @arg EP_TYPE_INTR: Interrupt type * @param  token : Endpoint Type *          This parameter can be one of the these values: *            @arg 0: PID_SETUP *            @arg 1: PID_DATA * @param  pbuff : pointer to URB data * @param  length : Length of URB data * @param  do_ping : activate do ping protocol (for high speed only) *          This parameter can be one of the these values: *           0 : do ping inactive *           1 : do ping active * @retval Status */USBH_StatusTypeDef USBH_LL_SubmitURB(USBH_HandleTypeDef *phost, uint8_t pipe,                                     uint8_t direction, uint8_t ep_type,                                     uint8_t token, uint8_t* pbuff,                                     uint16_t length, uint8_t do_ping) {  HAL_HCD_HC_SubmitRequest(phost->pData, pipe, direction, ep_type, token, pbuff,                           length, do_ping);  return USBH_OK;}
开发者ID:AndrewCapon,项目名称:axoloti,代码行数:37,



注:本文中的HAL_HCD_HC_SubmitRequest函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ HAL_HCD_IRQHandler函数代码示例
C++ HAL_HCD_GetCurrentFrame函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。