micropython-esp32 icon indicating copy to clipboard operation
micropython-esp32 copied to clipboard

machine.mem32[] returns signed 32bit integers

Open oddstr13 opened this issue 7 years ago • 2 comments

I would expect unsigned integers here.

oddstr13 avatar May 09 '17 00:05 oddstr13

Yes, it's possible that unsigned integers would be the more common use. But it's easy to get around the current behaviour: just do mem32[addr] & 0xffffffff.

It could be argued that there should be signed and unsigned accessors, like mem32 for signed and umem32 for unsigned.

dpgeorge avatar May 09 '17 06:05 dpgeorge

(yeah, I think we should fix that ... but that'd be all the ports, right?

nickzoic avatar Aug 03 '17 12:08 nickzoic