Skip to content

Commit 40a7173

Browse files
committed
cores/usb/generic_device: option to bufferize the IN enpoints
see lambdaconcept/luna@336a4ce
1 parent 1940353 commit 40a7173

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lambdalib/cores/usb/generic_device.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def __init__(self, pins,
3636
with_microsoft_os_1_0=False, # Set to True for interface 0,
3737
# or pass a list() of interfaces
3838
force_contiguous_blockram=False,
39+
bufferize_ep_in=True,
3940
**kwargs):
4041

4142
self.pins = pins
@@ -64,6 +65,7 @@ def __init__(self, pins,
6465
self.with_cdc = with_cdc
6566
self.with_microsoft_os_1_0 = with_microsoft_os_1_0
6667
self.force_contiguous_blockram = force_contiguous_blockram
68+
self.bufferize_ep_in = bufferize_ep_in
6769

6870
self.kwargs = kwargs
6971

@@ -204,6 +206,7 @@ def elaborate(self, platform):
204206
stream_in_ep = ep_i_cls(
205207
endpoint_number=self.BULK_ENDPOINT_NUMBER + k,
206208
max_packet_size=i,
209+
bufferize_output=self.bufferize_ep_in,
207210
)
208211
usb.add_endpoint(stream_in_ep)
209212
m.d.comb += self.sinks[k].connect(stream_in_ep.sink)

0 commit comments

Comments
 (0)