66)
77from .utils import (
88 endpoint_descriptor ,
9- EP_OUT_FLAG
9+ EP_IN_FLAG
1010)
1111from micropython import const
1212import ustruct
@@ -63,8 +63,8 @@ def get_itf_descriptor(self, num_eps, itf_idx, str_idx):
6363 return desc , strs
6464
6565 def get_endpoint_descriptors (self , ep_addr , str_idx ):
66- self .ep_in = endpoint_descriptor ((ep_addr + 1 ) | EP_OUT_FLAG , "interrupt" , 8 , 16 )
67- return (self .ep_in , [], ((ep_addr + 1 ) | EP_OUT_FLAG ,))
66+ self .ep_in = endpoint_descriptor ((ep_addr + 1 ) | EP_IN_FLAG , "interrupt" , 8 , 16 )
67+ return (self .ep_in , [], ((ep_addr + 1 ) | EP_IN_FLAG ,))
6868
6969
7070class CDCDataInterface (USBInterface ):
@@ -80,9 +80,8 @@ def __init__(self, interface_str, timeout=1):
8080 self .timeout = timeout
8181
8282 def get_endpoint_descriptors (self , ep_addr , str_idx ):
83- # XXX OUT = 0x00 but is defined as 0x80?
84- self .ep_in = (ep_addr + 2 ) | EP_OUT_FLAG
85- self .ep_out = (ep_addr + 2 ) & ~ EP_OUT_FLAG
83+ self .ep_in = (ep_addr + 2 ) | EP_IN_FLAG
84+ self .ep_out = (ep_addr + 2 ) & ~ EP_IN_FLAG
8685 # one IN / OUT Endpoint
8786 e_out = endpoint_descriptor (self .ep_out , "bulk" , 64 , 0 )
8887 e_in = endpoint_descriptor (self .ep_in , "bulk" , 64 , 0 )
0 commit comments