-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
@daniel-j
Hi daniel.
I am playing and cores the old programs to bring them to 0.4.0. First of all I noticed that (in my USB library, but perhaps also in /Pico /Stionim ->) the program fails:
../hardware/i2c.nim
proc stdinReadLine*(echoInput: bool = true): string =
while true:
let res = getcharTimeoutUs(100_000) #return -2 if empty buffer
if res != PicoErrorTimeout.int: # --> if res >= 0 and PicoErrorTimeout.int:
let character = res.char #non convert values < 0
if character == '\r':
echo ""
break
else:
result.add(character)
if echoInput:
discard putcharRaw(character.cint)
stdioFlush()This is because (it seems) that "Gettimeoutus" if he has nothing written in the Buffer returns -2, and the conversion obviously fails. Give us a look!!
Second, I bought the RP 2350 to try it, I wondered if during the compilation (or I don't know when) to fill in for it, you have to put some flag somewhere!(I see that you added something for him)
for the monte is all! bye by Martin A.
I will definitely disturb you again
Metadata
Metadata
Assignees
Labels
No labels