20 #include "usb_compiler.h"
63 #define U32_LE(v) (uint32_t)(__rev(v))
64 #define U16_LE(v) (uint16_t)(__rev(v) >> 16)
65 #define U32_BE(v) (uint32_t)(v)
66 #define U16_BE(v) (uint16_t)(v)
68 #define U32_BE(v) (uint32_t)(__rev(v))
69 #define U16_BE(v) (uint16_t)(__rev(v) >> 16)
70 #define U32_LE(v) (uint32_t)(v)
71 #define U16_LE(v) (uint16_t)(v)
85 #define USBD_MSC_MEDIA_READY (1U)
86 #define USBD_MSC_MEDIA_PROTECTED (1U<<1)
108 USBH_NOTIFY_CONNECT = 0,
109 USBH_NOTIFY_DISCONNECT,
111 USBH_NOTIFY_OVERCURRENT,
112 USBH_NOTIFY_REMOTE_WAKEUP,
113 USBH_NOTIFY_UNKNOWN_DEVICE,
114 USBH_NOTIFY_INSUFFICIENT_POWER,
115 USBH_NOTIFY_CONFIGURATION_FAILED,
116 USBH_NOTIFY_INITIALIZATION_FAILED
127 uint8_t bEndpointAddress;
128 uint8_t bmAttributes;
129 uint16_t wMaxPacketSize;
133 uint32_t transferred;
146 uint8_t configured : 1;
147 uint8_t initialized : 1;
148 uint8_t reserved : 6;
150 uint16_t max_packet_size;
154 uint8_t class_custom;
155 uint8_t class_instance;
156 uint8_t class_driver;
157 uint8_t dev_desc_len;
158 uint16_t cfg_desc_len;
160 osThreadId recovery_thread_id;
169 extern const uint8_t usbh_cls_num;
368 #define USBD_ADC_SpeakerSetVolumeRange USBD_ADC_SetSpeakerVolumeRange
369 #define USBD_ADC_MicrophoneSetVolumeRange USBD_ADC_SetMicrophoneVolumeRange
808 bool USBD_HIDn_SetReport (uint8_t rtype, uint8_t req, uint8_t rid,
const uint8_t *buf, int32_t len);
975 extern usbStatus
USBD_EndpointRead (uint8_t device, uint8_t ep_addr, uint8_t *buf, uint32_t len);
993 extern usbStatus
USBD_EndpointWrite (uint8_t device, uint8_t ep_addr,
const uint8_t *buf, uint32_t len);
1024 #define USBH_GetDeviceStatus USBH_Device_GetStatus
1102 extern void USBH_Port_Notify (uint8_t ctrl, uint8_t port, USBH_NOTIFY notify);
1108 #define USBH_MSC_GetDeviceStatus USBH_MSC_GetStatus
1137 extern usbStatus
USBH_MSC_Read (uint8_t instance, uint32_t lba, uint32_t cnt, uint8_t *buf);
1145 extern usbStatus
USBH_MSC_Write (uint8_t instance, uint32_t lba, uint32_t cnt,
const uint8_t *buf);
1152 extern usbStatus
USBH_MSC_ReadCapacity (uint8_t instance, uint32_t *block_count, uint32_t *block_size);
1158 #define USBH_HID_GetDeviceStatus USBH_HID_GetStatus
1188 extern int32_t
USBH_HID_Read (uint8_t instance, uint8_t *buf, int32_t len);
1197 extern int32_t
USBH_HID_Write (uint8_t instance,
const uint8_t *buf, int32_t len);
1207 typedef struct _usbHID_MouseState {
1237 #define USBH_CDC_ACM_GetDeviceStatus USBH_CDC_ACM_GetStatus
1265 extern usbStatus
USBH_CDC_ACM_Send (uint8_t instance,
const uint8_t *data, uint32_t num);
1330 #define USBH_CustomClass_GetDeviceStatus USBH_CustomClass_GetStatus
1385 extern USBH_PIPE *
USBH_PipeCreate (uint8_t ctrl, uint8_t dev_addr, uint8_t dev_speed, uint8_t hub_addr, uint8_t hub_port, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_max_packet_size, uint8_t ep_interval);
1396 extern usbStatus
USBH_PipeModify (uint8_t ctrl,
USBH_PIPE *ptr_pipe, uint8_t dev_addr, uint8_t dev_speed, uint8_t hub_addr, uint8_t hub_port, uint16_t ep_max_packet_size);
1526 extern usbStatus
USBH_DeviceRequest_GetDescriptor (uint8_t ctrl, uint8_t recipient, uint8_t descriptor_type, uint8_t descriptor_index, uint16_t language_id, uint8_t *descriptor_data, uint16_t descriptor_length);
1537 extern usbStatus
USBH_DeviceRequest_SetDescriptor (uint8_t ctrl, uint8_t recipient, uint8_t descriptor_type, uint8_t descriptor_index, uint16_t language_id,
const uint8_t *descriptor_data, uint16_t descriptor_length);
1573 void USBD_Device0_Initialize (
void);
1574 void USBD_Device0_Uninitialize (
void);
1575 void USBD_Device0_VbusChanged (
bool level);
1576 void USBD_Device0_Reset (
void);
1577 void USBD_Device0_HighSpeedActivated (
void);
1578 void USBD_Device0_Suspended (
void);
1579 void USBD_Device0_Resumed (
void);
1580 void USBD_Device0_Enumerated (
void);
1581 void USBD_Device0_EnableRemoteWakeup (
void);
1582 void USBD_Device0_DisableRemoteWakeup (
void);
1583 usbdRequestStatus USBD_Device0_Endpoint0_SetupPacketReceived (
const USB_SETUP_PACKET *setup_packet, uint8_t **buf, uint32_t *len);
1584 void USBD_Device0_Endpoint0_SetupPacketProcessed (
const USB_SETUP_PACKET *setup_packet);
1585 usbdRequestStatus USBD_Device0_Endpoint0_OutDataReceived (uint32_t len);
1586 usbdRequestStatus USBD_Device0_Endpoint0_InDataSent (uint32_t len);
1588 void USBD_Device1_Initialize (
void);
1589 void USBD_Device1_Uninitialize (
void);
1590 void USBD_Device1_VbusChanged (
bool level);
1591 void USBD_Device1_Reset (
void);
1592 void USBD_Device1_HighSpeedActivated (
void);
1593 void USBD_Device1_Suspended (
void);
1594 void USBD_Device1_Resumed (
void);
1595 void USBD_Device1_Enumerated (
void);
1596 void USBD_Device1_EnableRemoteWakeup (
void);
1597 void USBD_Device1_DisableRemoteWakeup (
void);
1598 usbdRequestStatus USBD_Device1_Endpoint0_SetupPacketReceived (
const USB_SETUP_PACKET *setup_packet, uint8_t **buf, uint32_t *len);
1599 void USBD_Device1_Endpoint0_SetupPacketProcessed (
const USB_SETUP_PACKET *setup_packet);
1600 usbdRequestStatus USBD_Device1_Endpoint0_OutDataReceived (uint32_t len);
1601 usbdRequestStatus USBD_Device1_Endpoint0_InDataSent (uint32_t len);
1603 void USBD_Device2_Initialize (
void);
1604 void USBD_Device2_Uninitialize (
void);
1605 void USBD_Device2_VbusChanged (
bool level);
1606 void USBD_Device2_Reset (
void);
1607 void USBD_Device2_HighSpeedActivated (
void);
1608 void USBD_Device2_Suspended (
void);
1609 void USBD_Device2_Resumed (
void);
1610 void USBD_Device2_Enumerated (
void);
1611 void USBD_Device2_EnableRemoteWakeup (
void);
1612 void USBD_Device2_DisableRemoteWakeup (
void);
1613 usbdRequestStatus USBD_Device2_Endpoint0_SetupPacketReceived (
const USB_SETUP_PACKET *setup_packet, uint8_t **buf, uint32_t *len);
1614 void USBD_Device2_Endpoint0_SetupPacketProcessed (
const USB_SETUP_PACKET *setup_packet);
1615 usbdRequestStatus USBD_Device2_Endpoint0_OutDataReceived (uint32_t len);
1616 usbdRequestStatus USBD_Device2_Endpoint0_InDataSent (uint32_t len);
1618 void USBD_Device3_Initialize (
void);
1619 void USBD_Device3_Uninitialize (
void);
1620 void USBD_Device3_VbusChanged (
bool level);
1621 void USBD_Device3_Reset (
void);
1622 void USBD_Device3_HighSpeedActivated (
void);
1623 void USBD_Device3_Suspended (
void);
1624 void USBD_Device3_Resumed (
void);
1625 void USBD_Device3_Enumerated (
void);
1626 void USBD_Device3_EnableRemoteWakeup (
void);
1627 void USBD_Device3_DisableRemoteWakeup (
void);
1628 usbdRequestStatus USBD_Device3_Endpoint0_SetupPacketReceived (
const USB_SETUP_PACKET *setup_packet, uint8_t **buf, uint32_t *len);
1629 void USBD_Device3_Endpoint0_SetupPacketProcessed (
const USB_SETUP_PACKET *setup_packet);
1630 usbdRequestStatus USBD_Device3_Endpoint0_OutDataReceived (uint32_t len);
1631 usbdRequestStatus USBD_Device3_Endpoint0_InDataSent (uint32_t len);
1633 void USBD_ADC0_Initialize (
void);
1634 void USBD_ADC0_Uninitialize (
void);
1635 void USBD_ADC0_PlayStart (
void);
1636 void USBD_ADC0_PlayStop (
void);
1637 void USBD_ADC0_SetSpeakerMute (uint8_t ch,
bool on);
1638 void USBD_ADC0_SetSpeakerVolume (uint8_t ch, uint16_t vol);
1639 void USBD_ADC0_RecordStart (
void);
1640 void USBD_ADC0_RecordStop (
void);
1641 void USBD_ADC0_SetMicrophoneMute (uint8_t ch,
bool on);
1642 void USBD_ADC0_SetMicrophoneVolume (uint8_t ch, uint16_t vol);
1643 void USBD_ADC0_ReceivedSamples (
void);
1645 void USBD_ADC1_Initialize (
void);
1646 void USBD_ADC1_Uninitialize (
void);
1647 void USBD_ADC1_PlayStart (
void);
1648 void USBD_ADC1_PlayStop (
void);
1649 void USBD_ADC1_SetSpeakerMute (uint8_t ch,
bool on);
1650 void USBD_ADC1_SetSpeakerVolume (uint8_t ch, uint16_t vol);
1651 void USBD_ADC1_RecordStart (
void);
1652 void USBD_ADC1_RecordStop (
void);
1653 void USBD_ADC1_SetMicrophoneMute (uint8_t ch,
bool on);
1654 void USBD_ADC1_SetMicrophoneVolume (uint8_t ch, uint16_t vol);
1655 void USBD_ADC1_ReceivedSamples (
void);
1657 void USBD_ADC2_Initialize (
void);
1658 void USBD_ADC2_Uninitialize (
void);
1659 void USBD_ADC2_PlayStart (
void);
1660 void USBD_ADC2_PlayStop (
void);
1661 void USBD_ADC2_SetSpeakerMute (uint8_t ch,
bool on);
1662 void USBD_ADC2_SetSpeakerVolume (uint8_t ch, uint16_t vol);
1663 void USBD_ADC2_RecordStart (
void);
1664 void USBD_ADC2_RecordStop (
void);
1665 void USBD_ADC2_SetMicrophoneMute (uint8_t ch,
bool on);
1666 void USBD_ADC2_SetMicrophoneVolume (uint8_t ch, uint16_t vol);
1667 void USBD_ADC2_ReceivedSamples (
void);
1669 void USBD_ADC3_Initialize (
void);
1670 void USBD_ADC3_Uninitialize (
void);
1671 void USBD_ADC3_PlayStart (
void);
1672 void USBD_ADC3_PlayStop (
void);
1673 void USBD_ADC3_SetSpeakerMute (uint8_t ch,
bool on);
1674 void USBD_ADC3_SetSpeakerVolume (uint8_t ch, uint16_t vol);
1675 void USBD_ADC3_RecordStart (
void);
1676 void USBD_ADC3_RecordStop (
void);
1677 void USBD_ADC3_SetMicrophoneMute (uint8_t ch,
bool on);
1678 void USBD_ADC3_SetMicrophoneVolume (uint8_t ch, uint16_t vol);
1679 void USBD_ADC3_ReceivedSamples (
void);
1681 void USBD_CDC0_ACM_Initialize (
void);
1682 void USBD_CDC0_ACM_Uninitialize (
void);
1683 void USBD_CDC0_ACM_Reset (
void);
1685 bool USBD_CDC0_ACM_SetControlLineState (uint16_t state);
1686 void USBD_CDC0_ACM_DataReceived (uint32_t len);
1687 void USBD_CDC0_ACM_DataSent (
void);
1688 void USBD_CDC0_NCM_Initialize (
void);
1689 void USBD_CDC0_NCM_Uninitialize (
void);
1690 void USBD_CDC0_NCM_Reset (
void);
1691 void USBD_CDC0_NCM_Start (
void);
1692 void USBD_CDC0_NCM_Stop (
void);
1693 bool USBD_CDC0_NCM_SetEthernetMulticastFilters (
const uint8_t *addr_list, uint16_t num_of_filters);
1694 bool USBD_CDC0_NCM_SetEthernetPowerManagementPatternFilter (uint16_t filter_number,
const uint8_t *pattern_filter, uint16_t pattern_filter_size);
1695 bool USBD_CDC0_NCM_GetEthernetPowerManagementPatternFilter (uint16_t filter_number, uint16_t *pattern_active);
1696 bool USBD_CDC0_NCM_SetEthernetPacketFilter (uint16_t packet_filter_bitmap);
1697 bool USBD_CDC0_NCM_GetEthernetStatistic (uint16_t feature_selector, uint32_t *data);
1698 bool USBD_CDC0_NCM_GetNtbParameters (CDC_NCM_NTB_PARAM *ntb_params);
1699 bool USBD_CDC0_NCM_GetNetAddress (uint8_t *net_addr);
1700 bool USBD_CDC0_NCM_SetNetAddress (
const uint8_t *net_addr);
1701 bool USBD_CDC0_NCM_GetNtbFormat (uint16_t *ntb_format);
1702 bool USBD_CDC0_NCM_SetNtbFormat (uint16_t ntb_format);
1703 bool USBD_CDC0_NCM_GetNtbInputSize (uint32_t *ntb_input_size);
1704 bool USBD_CDC0_NCM_SetNtbInputSize (uint32_t ntb_input_size);
1705 bool USBD_CDC0_NCM_GetMaxDatagramSize (uint16_t *max_datagram_size);
1706 bool USBD_CDC0_NCM_SetMaxDatagramSize (uint16_t max_datagram_size);
1707 bool USBD_CDC0_NCM_GetCrcMode (uint16_t *crc_mode);
1708 bool USBD_CDC0_NCM_SetCrcMode (uint16_t crc_mode);
1709 void USBD_CDC0_NCM_NTB_IN_Sent (
void);
1710 void USBD_CDC0_NCM_NTB_OUT_Received (
void);
1712 void USBD_CDC1_ACM_Initialize (
void);
1713 void USBD_CDC1_ACM_Uninitialize (
void);
1714 void USBD_CDC1_ACM_Reset (
void);
1716 bool USBD_CDC1_ACM_SetControlLineState (uint16_t state);
1717 void USBD_CDC1_ACM_DataReceived (uint32_t len);
1718 void USBD_CDC1_ACM_DataSent (
void);
1719 void USBD_CDC1_NCM_Initialize (
void);
1720 void USBD_CDC1_NCM_Uninitialize (
void);
1721 void USBD_CDC1_NCM_Reset (
void);
1722 void USBD_CDC1_NCM_Start (
void);
1723 void USBD_CDC1_NCM_Stop (
void);
1724 bool USBD_CDC1_NCM_SetEthernetMulticastFilters (
const uint8_t *addr_list, uint16_t num_of_filters);
1725 bool USBD_CDC1_NCM_SetEthernetPowerManagementPatternFilter (uint16_t filter_number,
const uint8_t *pattern_filter, uint16_t pattern_filter_size);
1726 bool USBD_CDC1_NCM_GetEthernetPowerManagementPatternFilter (uint16_t filter_number, uint16_t *pattern_active);
1727 bool USBD_CDC1_NCM_SetEthernetPacketFilter (uint16_t packet_filter_bitmap);
1728 bool USBD_CDC1_NCM_GetEthernetStatistic (uint16_t feature_selector, uint32_t *data);
1729 bool USBD_CDC1_NCM_GetNtbParameters (CDC_NCM_NTB_PARAM *ntb_params);
1730 bool USBD_CDC1_NCM_GetNetAddress (uint8_t *net_addr);
1731 bool USBD_CDC1_NCM_SetNetAddress (
const uint8_t *net_addr);
1732 bool USBD_CDC1_NCM_GetNtbFormat (uint16_t *ntb_format);
1733 bool USBD_CDC1_NCM_SetNtbFormat (uint16_t ntb_format);
1734 bool USBD_CDC1_NCM_GetNtbInputSize (uint32_t *ntb_input_size);
1735 bool USBD_CDC1_NCM_SetNtbInputSize (uint32_t ntb_input_size);
1736 bool USBD_CDC1_NCM_GetMaxDatagramSize (uint16_t *max_datagram_size);
1737 bool USBD_CDC1_NCM_SetMaxDatagramSize (uint16_t max_datagram_size);
1738 bool USBD_CDC1_NCM_GetCrcMode (uint16_t *crc_mode);
1739 bool USBD_CDC1_NCM_SetCrcMode (uint16_t crc_mode);
1740 void USBD_CDC1_NCM_NTB_IN_Sent (
void);
1741 void USBD_CDC1_NCM_NTB_OUT_Received (
void);
1743 void USBD_CDC2_ACM_Initialize (
void);
1744 void USBD_CDC2_ACM_Uninitialize (
void);
1745 void USBD_CDC2_ACM_Reset (
void);
1747 bool USBD_CDC2_ACM_SetControlLineState (uint16_t state);
1748 void USBD_CDC2_ACM_DataReceived (uint32_t len);
1749 void USBD_CDC2_ACM_DataSent (
void);
1750 void USBD_CDC2_NCM_Initialize (
void);
1751 void USBD_CDC2_NCM_Uninitialize (
void);
1752 void USBD_CDC2_NCM_Reset (
void);
1753 void USBD_CDC2_NCM_Start (
void);
1754 void USBD_CDC2_NCM_Stop (
void);
1755 bool USBD_CDC2_NCM_SetEthernetMulticastFilters (
const uint8_t *addr_list, uint16_t num_of_filters);
1756 bool USBD_CDC2_NCM_SetEthernetPowerManagementPatternFilter (uint16_t filter_number,
const uint8_t *pattern_filter, uint16_t pattern_filter_size);
1757 bool USBD_CDC2_NCM_GetEthernetPowerManagementPatternFilter (uint16_t filter_number, uint16_t *pattern_active);
1758 bool USBD_CDC2_NCM_SetEthernetPacketFilter (uint16_t packet_filter_bitmap);
1759 bool USBD_CDC2_NCM_GetEthernetStatistic (uint16_t feature_selector, uint32_t *data);
1760 bool USBD_CDC2_NCM_GetNtbParameters (CDC_NCM_NTB_PARAM *ntb_params);
1761 bool USBD_CDC2_NCM_GetNetAddress (uint8_t *net_addr);
1762 bool USBD_CDC2_NCM_SetNetAddress (
const uint8_t *net_addr);
1763 bool USBD_CDC2_NCM_GetNtbFormat (uint16_t *ntb_format);
1764 bool USBD_CDC2_NCM_SetNtbFormat (uint16_t ntb_format);
1765 bool USBD_CDC2_NCM_GetNtbInputSize (uint32_t *ntb_input_size);
1766 bool USBD_CDC2_NCM_SetNtbInputSize (uint32_t ntb_input_size);
1767 bool USBD_CDC2_NCM_GetMaxDatagramSize (uint16_t *max_datagram_size);
1768 bool USBD_CDC2_NCM_SetMaxDatagramSize (uint16_t max_datagram_size);
1769 bool USBD_CDC2_NCM_GetCrcMode (uint16_t *crc_mode);
1770 bool USBD_CDC2_NCM_SetCrcMode (uint16_t crc_mode);
1771 void USBD_CDC2_NCM_NTB_IN_Sent (
void);
1772 void USBD_CDC2_NCM_NTB_OUT_Received (
void);
1774 void USBD_CDC3_ACM_Initialize (
void);
1775 void USBD_CDC3_ACM_Uninitialize (
void);
1776 void USBD_CDC3_ACM_Reset (
void);
1778 bool USBD_CDC3_ACM_SetControlLineState (uint16_t state);
1779 void USBD_CDC3_ACM_DataReceived (uint32_t len);
1780 void USBD_CDC3_ACM_DataSent (
void);
1781 void USBD_CDC3_NCM_Initialize (
void);
1782 void USBD_CDC3_NCM_Uninitialize (
void);
1783 void USBD_CDC3_NCM_Reset (
void);
1784 void USBD_CDC3_NCM_Start (
void);
1785 void USBD_CDC3_NCM_Stop (
void);
1786 bool USBD_CDC3_NCM_SetEthernetMulticastFilters (
const uint8_t *addr_list, uint16_t num_of_filters);
1787 bool USBD_CDC3_NCM_SetEthernetPowerManagementPatternFilter (uint16_t filter_number,
const uint8_t *pattern_filter, uint16_t pattern_filter_size);
1788 bool USBD_CDC3_NCM_GetEthernetPowerManagementPatternFilter (uint16_t filter_number, uint16_t *pattern_active);
1789 bool USBD_CDC3_NCM_SetEthernetPacketFilter (uint16_t packet_filter_bitmap);
1790 bool USBD_CDC3_NCM_GetEthernetStatistic (uint16_t feature_selector, uint32_t *data);
1791 bool USBD_CDC3_NCM_GetNtbParameters (CDC_NCM_NTB_PARAM *ntb_params);
1792 bool USBD_CDC3_NCM_GetNetAddress (uint8_t *net_addr);
1793 bool USBD_CDC3_NCM_SetNetAddress (
const uint8_t *net_addr);
1794 bool USBD_CDC3_NCM_GetNtbFormat (uint16_t *ntb_format);
1795 bool USBD_CDC3_NCM_SetNtbFormat (uint16_t ntb_format);
1796 bool USBD_CDC3_NCM_GetNtbInputSize (uint32_t *ntb_input_size);
1797 bool USBD_CDC3_NCM_SetNtbInputSize (uint32_t ntb_input_size);
1798 bool USBD_CDC3_NCM_GetMaxDatagramSize (uint16_t *max_datagram_size);
1799 bool USBD_CDC3_NCM_SetMaxDatagramSize (uint16_t max_datagram_size);
1800 bool USBD_CDC3_NCM_GetCrcMode (uint16_t *crc_mode);
1801 bool USBD_CDC3_NCM_SetCrcMode (uint16_t crc_mode);
1802 void USBD_CDC3_NCM_NTB_IN_Sent (
void);
1803 void USBD_CDC3_NCM_NTB_OUT_Received (
void);
1805 void USBD_HID0_Initialize (
void);
1806 void USBD_HID0_Uninitialize (
void);
1807 int32_t USBD_HID0_GetReport (uint8_t rtype, uint8_t req, uint8_t rid, uint8_t *buf);
1808 bool USBD_HID0_SetReport (uint8_t rtype, uint8_t req, uint8_t rid,
const uint8_t *buf, int32_t len);
1810 void USBD_HID1_Initialize (
void);
1811 void USBD_HID1_Uninitialize (
void);
1812 int32_t USBD_HID1_GetReport (uint8_t rtype, uint8_t req, uint8_t rid, uint8_t *buf);
1813 bool USBD_HID1_SetReport (uint8_t rtype, uint8_t req, uint8_t rid,
const uint8_t *buf, int32_t len);
1815 void USBD_HID2_Initialize (
void);
1816 void USBD_HID2_Uninitialize (
void);
1817 int32_t USBD_HID2_GetReport (uint8_t rtype, uint8_t req, uint8_t rid, uint8_t *buf);
1818 bool USBD_HID2_SetReport (uint8_t rtype, uint8_t req, uint8_t rid,
const uint8_t *buf, int32_t len);
1820 void USBD_HID3_Initialize (
void);
1821 void USBD_HID3_Uninitialize (
void);
1822 int32_t USBD_HID3_GetReport (uint8_t rtype, uint8_t req, uint8_t rid, uint8_t *buf);
1823 bool USBD_HID3_SetReport (uint8_t rtype, uint8_t req, uint8_t rid,
const uint8_t *buf, int32_t len);
1825 void USBD_MSC0_Initialize (
void);
1826 void USBD_MSC0_Uninitialize (
void);
1827 bool USBD_MSC0_GetCacheInfo (uint32_t *buffer, uint32_t *size);
1828 bool USBD_MSC0_GetMediaCapacity (uint32_t *block_count, uint32_t *block_size);
1829 bool USBD_MSC0_StartStop (
bool start);
1830 uint32_t USBD_MSC0_CheckMedia (
void);
1832 void USBD_MSC1_Initialize (
void);
1833 void USBD_MSC1_Uninitialize (
void);
1834 bool USBD_MSC1_GetCacheInfo (uint32_t *buffer, uint32_t *size);
1835 bool USBD_MSC1_GetMediaCapacity (uint32_t *block_count, uint32_t *block_size);
1836 bool USBD_MSC1_StartStop (
bool start);
1837 uint32_t USBD_MSC1_CheckMedia (
void);
1839 void USBD_MSC2_Initialize (
void);
1840 void USBD_MSC2_Uninitialize (
void);
1841 bool USBD_MSC2_GetCacheInfo (uint32_t *buffer, uint32_t *size);
1842 bool USBD_MSC2_GetMediaCapacity (uint32_t *block_count, uint32_t *block_size);
1843 bool USBD_MSC2_StartStop (
bool start);
1844 uint32_t USBD_MSC2_CheckMedia (
void);
1846 void USBD_MSC3_Initialize (
void);
1847 void USBD_MSC3_Uninitialize (
void);
1848 bool USBD_MSC3_GetCacheInfo (uint32_t *buffer, uint32_t *size);
1849 bool USBD_MSC3_GetMediaCapacity (uint32_t *block_count, uint32_t *block_size);
1850 bool USBD_MSC3_StartStop (
bool start);
1851 uint32_t USBD_MSC3_CheckMedia (
void);
1853 void USBD_CustomClass0_Initialize (
void);
1854 void USBD_CustomClass0_Uninitialize (
void);
1855 void USBD_CustomClass0_Reset (
void);
1856 void USBD_CustomClass0_EndpointStart (uint8_t ep_addr);
1857 void USBD_CustomClass0_EndpointStop (uint8_t ep_addr);
1858 usbdRequestStatus USBD_CustomClass0_Endpoint0_SetupPacketReceived (
const USB_SETUP_PACKET *setup_packet, uint8_t **buf, uint32_t *len);
1859 void USBD_CustomClass0_Endpoint0_SetupPacketProcessed (
const USB_SETUP_PACKET *setup_packet);
1860 usbdRequestStatus USBD_CustomClass0_Endpoint0_OutDataReceived (uint32_t len);
1861 usbdRequestStatus USBD_CustomClass0_Endpoint0_InDataSent (uint32_t len);
1862 void USBD_CustomClass0_Endpoint1_Event (uint32_t event);
1863 void USBD_CustomClass0_Endpoint2_Event (uint32_t event);
1864 void USBD_CustomClass0_Endpoint3_Event (uint32_t event);
1865 void USBD_CustomClass0_Endpoint4_Event (uint32_t event);
1866 void USBD_CustomClass0_Endpoint5_Event (uint32_t event);
1867 void USBD_CustomClass0_Endpoint6_Event (uint32_t event);
1868 void USBD_CustomClass0_Endpoint7_Event (uint32_t event);
1869 void USBD_CustomClass0_Endpoint8_Event (uint32_t event);
1870 void USBD_CustomClass0_Endpoint9_Event (uint32_t event);
1871 void USBD_CustomClass0_Endpoint10_Event (uint32_t event);
1872 void USBD_CustomClass0_Endpoint11_Event (uint32_t event);
1873 void USBD_CustomClass0_Endpoint12_Event (uint32_t event);
1874 void USBD_CustomClass0_Endpoint13_Event (uint32_t event);
1875 void USBD_CustomClass0_Endpoint14_Event (uint32_t event);
1876 void USBD_CustomClass0_Endpoint15_Event (uint32_t event);
1878 void USBD_CustomClass1_Initialize (
void);
1879 void USBD_CustomClass1_Uninitialize (
void);
1880 void USBD_CustomClass1_Reset (
void);
1881 void USBD_CustomClass1_EndpointStart (uint8_t ep_addr);
1882 void USBD_CustomClass1_EndpointStop (uint8_t ep_addr);
1883 usbdRequestStatus USBD_CustomClass1_Endpoint0_SetupPacketReceived (
const USB_SETUP_PACKET *setup_packet, uint8_t **buf, uint32_t *len);
1884 void USBD_CustomClass1_Endpoint0_SetupPacketProcessed (
const USB_SETUP_PACKET *setup_packet);
1885 usbdRequestStatus USBD_CustomClass1_Endpoint0_OutDataReceived (uint32_t len);
1886 usbdRequestStatus USBD_CustomClass1_Endpoint0_InDataSent (uint32_t len);
1887 void USBD_CustomClass1_Endpoint1_Event (uint32_t event);
1888 void USBD_CustomClass1_Endpoint2_Event (uint32_t event);
1889 void USBD_CustomClass1_Endpoint3_Event (uint32_t event);
1890 void USBD_CustomClass1_Endpoint4_Event (uint32_t event);
1891 void USBD_CustomClass1_Endpoint5_Event (uint32_t event);
1892 void USBD_CustomClass1_Endpoint6_Event (uint32_t event);
1893 void USBD_CustomClass1_Endpoint7_Event (uint32_t event);
1894 void USBD_CustomClass1_Endpoint8_Event (uint32_t event);
1895 void USBD_CustomClass1_Endpoint9_Event (uint32_t event);
1896 void USBD_CustomClass1_Endpoint10_Event (uint32_t event);
1897 void USBD_CustomClass1_Endpoint11_Event (uint32_t event);
1898 void USBD_CustomClass1_Endpoint12_Event (uint32_t event);
1899 void USBD_CustomClass1_Endpoint13_Event (uint32_t event);
1900 void USBD_CustomClass1_Endpoint14_Event (uint32_t event);
1901 void USBD_CustomClass1_Endpoint15_Event (uint32_t event);
1903 void USBD_CustomClass2_Initialize (
void);
1904 void USBD_CustomClass2_Uninitialize (
void);
1905 void USBD_CustomClass2_Reset (
void);
1906 void USBD_CustomClass2_EndpointStart (uint8_t ep_addr);
1907 void USBD_CustomClass2_EndpointStop (uint8_t ep_addr);
1908 usbdRequestStatus USBD_CustomClass2_Endpoint0_SetupPacketReceived (
const USB_SETUP_PACKET *setup_packet, uint8_t **buf, uint32_t *len);
1909 void USBD_CustomClass2_Endpoint0_SetupPacketProcessed (
const USB_SETUP_PACKET *setup_packet);
1910 usbdRequestStatus USBD_CustomClass2_Endpoint0_OutDataReceived (uint32_t len);
1911 usbdRequestStatus USBD_CustomClass2_Endpoint0_InDataSent (uint32_t len);
1912 void USBD_CustomClass2_Endpoint1_Event (uint32_t event);
1913 void USBD_CustomClass2_Endpoint2_Event (uint32_t event);
1914 void USBD_CustomClass2_Endpoint3_Event (uint32_t event);
1915 void USBD_CustomClass2_Endpoint4_Event (uint32_t event);
1916 void USBD_CustomClass2_Endpoint5_Event (uint32_t event);
1917 void USBD_CustomClass2_Endpoint6_Event (uint32_t event);
1918 void USBD_CustomClass2_Endpoint7_Event (uint32_t event);
1919 void USBD_CustomClass2_Endpoint8_Event (uint32_t event);
1920 void USBD_CustomClass2_Endpoint9_Event (uint32_t event);
1921 void USBD_CustomClass2_Endpoint10_Event (uint32_t event);
1922 void USBD_CustomClass2_Endpoint11_Event (uint32_t event);
1923 void USBD_CustomClass2_Endpoint12_Event (uint32_t event);
1924 void USBD_CustomClass2_Endpoint13_Event (uint32_t event);
1925 void USBD_CustomClass2_Endpoint14_Event (uint32_t event);
1926 void USBD_CustomClass2_Endpoint15_Event (uint32_t event);
1928 void USBD_CustomClass3_Initialize (
void);
1929 void USBD_CustomClass3_Uninitialize (
void);
1930 void USBD_CustomClass3_Reset (
void);
1931 void USBD_CustomClass3_EndpointStart (uint8_t ep_addr);
1932 void USBD_CustomClass3_EndpointStop (uint8_t ep_addr);
1933 usbdRequestStatus USBD_CustomClass3_Endpoint0_SetupPacketReceived (
const USB_SETUP_PACKET *setup_packet, uint8_t **buf, uint32_t *len);
1934 void USBD_CustomClass3_Endpoint0_SetupPacketProcessed (
const USB_SETUP_PACKET *setup_packet);
1935 usbdRequestStatus USBD_CustomClass3_Endpoint0_OutDataReceived (uint32_t len);
1936 usbdRequestStatus USBD_CustomClass3_Endpoint0_InDataSent (uint32_t len);
1937 void USBD_CustomClass3_Endpoint1_Event (uint32_t event);
1938 void USBD_CustomClass3_Endpoint2_Event (uint32_t event);
1939 void USBD_CustomClass3_Endpoint3_Event (uint32_t event);
1940 void USBD_CustomClass3_Endpoint4_Event (uint32_t event);
1941 void USBD_CustomClass3_Endpoint5_Event (uint32_t event);
1942 void USBD_CustomClass3_Endpoint6_Event (uint32_t event);
1943 void USBD_CustomClass3_Endpoint7_Event (uint32_t event);
1944 void USBD_CustomClass3_Endpoint8_Event (uint32_t event);
1945 void USBD_CustomClass3_Endpoint9_Event (uint32_t event);
1946 void USBD_CustomClass3_Endpoint10_Event (uint32_t event);
1947 void USBD_CustomClass3_Endpoint11_Event (uint32_t event);
1948 void USBD_CustomClass3_Endpoint12_Event (uint32_t event);
1949 void USBD_CustomClass3_Endpoint13_Event (uint32_t event);
1950 void USBD_CustomClass3_Endpoint14_Event (uint32_t event);
1951 void USBD_CustomClass3_Endpoint15_Event (uint32_t event);