• 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
arch/lm32 Loading commit data...
boards Loading commit data...
configs Loading commit data...
dev Loading commit data...
doc Loading commit data...
host Loading commit data...
include Loading commit data...
ipc Loading commit data...
lib Loading commit data...
liblinux Loading commit data...
monitor Loading commit data...
pp_printf Loading commit data...
ppsi @ dc1c7d26
scripts Loading commit data...
sdb-lib Loading commit data...
shell Loading commit data...
softpll Loading commit data...
test/snmp Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
COPYING Loading commit data...
Kconfig Loading commit data...
MAKEALL Loading commit data...
Makefile Loading commit data...
Makefile.kconfig Loading commit data...
check-error.c Loading commit data...
compare_size.sh Loading commit data...
dump-info.c Loading commit data...
revision.c Loading commit data...
save_size.sh Loading commit data...
system_checks.c Loading commit data...
wrc_main.c Loading commit data...
wrc_main_sim.c Loading commit data...