We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d354b0 commit e8b21b7Copy full SHA for e8b21b7
software/glasgow/applet/video/ws2812_output/__init__.py
@@ -1,5 +1,4 @@
1
import logging
2
-import asyncio
3
4
from amaranth import *
5
from amaranth.lib import io, wiring, stream
@@ -251,12 +250,7 @@ async def run(self, args):
251
250
)
252
while True:
253
try:
254
- data = await asyncio.shield(endpoint.recv(buffer_size))
255
- partial = len(data) % frame_size
256
- while partial:
257
- data += await asyncio.shield(endpoint.recv(frame_size - partial))
258
259
- await self.ws2812_iface.write(data)
+ await self.ws2812_iface.write(await endpoint.recv(frame_size))
260
except EOFError:
261
pass
262
0 commit comments