Teensy 4.1 core updated for C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 6 години
преди 5 години
преди 5 години
преди 5 години
123456789101112131415161718192021222324252627282930313233
  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);