Teensy 4.1 core updated for C++20
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

34 行
1.0KB

  1. #pragma once
  2. #include "imxrt.h"
  3. typedef struct transfer_struct transfer_t;
  4. struct transfer_struct {
  5. uint32_t next;
  6. volatile uint32_t status;
  7. uint32_t pointer0;
  8. uint32_t pointer1;
  9. uint32_t pointer2;
  10. uint32_t pointer3;
  11. uint32_t pointer4;
  12. uint32_t callback_param;
  13. };
  14. void usb_init(void);
  15. void usb_init_serialnumber(void);
  16. void usb_config_rx(uint32_t ep, uint32_t packet_size, int do_zlp, void (*cb)(transfer_t *));
  17. void usb_config_tx(uint32_t ep, uint32_t packet_size, int do_zlp, void (*cb)(transfer_t *));
  18. void usb_prepare_transfer(transfer_t *transfer, const void *data, uint32_t len, uint32_t param);
  19. void usb_transmit(int endpoint_number, transfer_t *transfer);
  20. void usb_receive(int endpoint_number, transfer_t *transfer);
  21. uint32_t usb_transfer_status(const transfer_t *transfer);
  22. void usb_start_sof_interrupts(int interface);
  23. void usb_stop_sof_interrupts(int interface);
  24. extern void (*usb_timer0_callback)(void);
  25. extern void (*usb_timer1_callback)(void);