Nick Moore
|
d0e5af3b09
|
Working flash pages for nvm.ByteArray adafruit/circuitpython#1042
import microcontroller
def dump(n = microcontroller.nvm):
for i in range(0,len(n)):
print ("%02X " % n[i], end="")
if i % 16 == 15: print('')
microcontroller.nvm[0:4096] = bytes([1,2,3,4,5,6,7,8]) * 512
microcontroller.nvm[4096:8192] = bytes([16,17,18,19]) * 1024
microcontroller.nvm[4090:4101] = b'thisisatest'
microcontroller.nvm[100:105] = b'hello'
microcontroller.nvm[8000:8007] = b'goodbye'
dump()
|
2019-04-16 14:53:44 +10:00 |
Nick Moore
|
8e7fee2246
|
Working flash pages for nvm.ByteArray adafruit/circuitpython#1042
import microcontroller
def dump(n = microcontroller.nvm):
for i in range(0,len(n)):
print ("%02X " % n[i], end="")
if i % 16 == 15: print('')
microcontroller.nvm[0:4096] = bytes([1,2,3,4,5,6,7,8]) * 512
microcontroller.nvm[4096:8192] = bytes([16,17,18,19]) * 1024
microcontroller.nvm[4090:4101] = b'thisisatest'
microcontroller.nvm[100:105] = b'hello'
microcontroller.nvm[8000:8007] = b'goodbye'
dump()
|
2019-04-09 10:55:39 +10:00 |