6
6
)
7
7
from .utils import (
8
8
endpoint_descriptor ,
9
- EP_OUT_FLAG
9
+ EP_IN_FLAG
10
10
)
11
11
from micropython import const
12
12
import ustruct
@@ -63,8 +63,8 @@ def get_itf_descriptor(self, num_eps, itf_idx, str_idx):
63
63
return desc , strs
64
64
65
65
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 ,))
68
68
69
69
70
70
class CDCDataInterface (USBInterface ):
@@ -80,9 +80,8 @@ def __init__(self, interface_str, timeout=1):
80
80
self .timeout = timeout
81
81
82
82
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
86
85
# one IN / OUT Endpoint
87
86
e_out = endpoint_descriptor (self .ep_out , "bulk" , 64 , 0 )
88
87
e_in = endpoint_descriptor (self .ep_in , "bulk" , 64 , 0 )
0 commit comments