You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the initial implementation, I fixed an issue with the `desc_cfg()` method in the MTP driver. The method was missing proper descriptor packing which is essential for USB enumeration.
- Implemented descriptor packing with `desc.pack()` for class-specific descriptors
90
+
- Aligned endpoint creation with other drivers
91
+
92
+
2. **Updated interface control transfer handling:**
93
+
- Renamed `control_req()` to `on_interface_control_xfer()` for consistency
94
+
- Fixed parameter handling to match other drivers
95
+
96
+
3. **Improved USB transfer methods:**
97
+
- Updated to use Interface base class methods
98
+
- Fixed callback parameter handling
99
+
- Corrected interface open state checking
100
+
101
+
4. **Updated example application:**
102
+
- Changed to use machine.USBDevice directly
103
+
- Improved USB device management and cleanup
104
+
- Made consistent with other driver examples
105
+
106
+
These changes make the MTP driver more robust and ensure it follows the same patterns as other drivers in the MicroPython USB framework. The driver now correctly provides USB descriptors needed for proper enumeration and operation on host systems.
0 commit comments