We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8f1727 commit f91a2faCopy full SHA for f91a2fa
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
@@ -232,12 +231,7 @@ async def run(self, args):
232
231
)
233
while True:
234
try:
235
- data = await asyncio.shield(endpoint.recv(buffer_size))
236
- partial = len(data) % frame_size
237
- while partial:
238
- data += await asyncio.shield(endpoint.recv(frame_size - partial))
239
240
- await self.ws2812_iface.write(data)
+ await self.ws2812_iface.write(await endpoint.recv(frame_size))
241
except EOFError:
242
pass
243
0 commit comments