You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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
procstdinReadLine*(echoInput: bool=true): string=whiletrue:
let res =getcharTimeoutUs(100_000) #return -2 if empty bufferif res !=PicoErrorTimeout.int: # --> if res >= 0 and PicoErrorTimeout.int:let character = res.char#non convert values < 0if character =='\r':
echo""breakelse:
result.add(character)
if echoInput:
discardputcharRaw(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
The text was updated successfully, but these errors were encountered:
@daniel-j
One thing that could perhaps be improved (as a lazy electronic) is the functions:
i2cWriteBlockingNim
i2cReadBlockingNim
Making the following, modification, which for practical use is perhaps more "natural" and practical (after -> the suggested modification):
proci2cWriteBlockingNim*(
i2c: ptrI2cInst,
address: I2cAddress, --> address: uint (omaybeUint8)
data: varopenArray[uint8],
noStop: bool=false
): int=## Write bytes to I2C bus.## If `noStop` is `true`, master retains control of the bus at the end of## the transfer.result= i2c.writeBlocking(address, data[0].addr, data.len.uint, noStop) -->result= i2c.writeBlocking(address.I2cAddress, data[0].addr, data.len.uint, noStop)
bye by Andrea
p.s. Unfortunately with git I am not very good hindsight I would try to make a Commit (but I will try in case of examples)
@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
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
The text was updated successfully, but these errors were encountered: