• Juan David González Cobas's avatar
    use bytes (integers) all along · c117db54
    Juan David González Cobas authored
    Dealing with mixed integers and strings (or bytes() when pyserial
    decides to do so) is a PITA that plagues all the code with ord()
    conversions and makes it error-prone and hard to debug. It is even more
    so if the python version (2.7 or 3.x) is not known in advance.
    
    To play safe
        - the firmware file is converted at read time into a bytearray,
          which is what it is
        - all data flow that is supposed to come from/to the serial line is
          cast into integer values as soon/later as possible; given that
          pyserial gives back str/bytes somehow at will, ord() calls at the
          .recv() method level are the safest way to ensure we get-a-byte,
          get-a-byte, get-a-byte, byte, byte.
    c117db54
Name
Last commit
Last update
..
build-random Loading commit data...
rf-xcvr-tool Loading commit data...
sdbfs Loading commit data...
sdbfs-flash Loading commit data...
trivial-init Loading commit data...
uart-bootloader Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
eb-w1-write.c Loading commit data...
eb-w1.c Loading commit data...
genraminit.c Loading commit data...
genrammif.c Loading commit data...
genramvhd.c Loading commit data...
gensdbfs.c Loading commit data...
gensdbfs.h Loading commit data...
git-compileall Loading commit data...
makebin.S Loading commit data...
mapper.c Loading commit data...
pfilter-builder.c Loading commit data...
sdbfs.README Loading commit data...
uart-bootloader.py Loading commit data...
update_configs Loading commit data...
wr-streamers.c Loading commit data...
wr_graph.py Loading commit data...
wrpc-diags.c Loading commit data...
wrpc-dump.c Loading commit data...
wrpc-vuart.c Loading commit data...
wrpc-w1-read.c Loading commit data...
wrpc-w1-write.c Loading commit data...