Skip to content

Commit 11f2fef

Browse files
committed
log
1 parent c8604d9 commit 11f2fef

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

micropython/usb/claude.log

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,30 @@ These improvements align better with MicroPython's design philosophy of efficien
7777
Total cost: $0.78
7878
Total duration (API): 4m 43.0s
7979
Total duration (wall): 15m 1.9s
80-
Total code changes: 1172 lines added, 0 lines removed
80+
Total code changes: 1172 lines added, 0 lines removed
81+
82+
## Follow-up Implementation - Descriptor Packing Fix
83+
84+
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.
85+
86+
### Changes Made:
87+
1. **Fixed `desc_cfg()` method:**
88+
- Added proper parameter signature (desc, itf_num, ep_num, strs)
89+
- 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

Comments
 (0)