| 273 | } |
| 274 | |
| 275 | static void usbd_ept_init(USBDCore_TypeDef *udev) |
| 276 | { |
| 277 | uint8_t ept_num = 0; |
| 278 | usb_ept_info *ept_info; |
| 279 | for (ept_num = 0; ept_num < 8; ept_num++) |
| 280 | { |
| 281 | ept_info = &udev->ept_io[ept_num]; |
| 282 | |
| 283 | ept_info->maxpacket = 64; |
| 284 | |
| 285 | ept_info->status = 1; |
| 286 | |
| 287 | ept_info->total_len = 0; |
| 288 | ept_info->trans_len = 0; |
| 289 | ept_info->trans_buf = NULL; |
| 290 | } |
| 291 | } |
| 292 | /** |
| 293 | * @brief usb endpoint receive data |
| 294 | * @param udev: to the structure of usbd_core_type |