本帖最后由 jiekou001 于 2017-9-25 21:06 编辑
- /**
- * [url=home.php?mod=space&uid=247401]@brief[/url] Set USB payload size (IN data)
- *
- * @param[in] ep The USB endpoint ID. M451 Series supports 8 hardware endpoint ID. This parameter could be 0 ~ 7.
- *
- * @param[in] size The transfer length.
- *
- * [url=home.php?mod=space&uid=266161]@return[/url] None
- *
- * [url=home.php?mod=space&uid=1543424]@Details[/url] This macro will write the transfer length to USB_MXPLDx register for IN data transaction.
- *
- */
- #define USBD_SET_PAYLOAD_LEN(ep, size) (*((__IO uint32_t *) ((uint32_t)&USBD->EP[0].MXPLD + (uint32_t)((ep) << 4))) = (size))
|