Looks like the serial_number() function will not populate the serial number on the devices when using the nusb backend, so this PR moves the read_serial_from_device function to the generic Backend implementation, and reuses it in the nusb backend.
I also noticed that the top-level read_serial_number and the read_serial_from_device functions were exactly the same except for the interface, so we're now reusing the backend to serve the request instead of duplicating the code.
Looks like the
serial_number()
function will not populate the serial number on the devices when using thenusb
backend, so this PR moves theread_serial_from_device
function to the genericBackend
implementation, and reuses it in thenusb
backend. I also noticed that the top-levelread_serial_number
and theread_serial_from_device
functions were exactly the same except for the interface, so we're now reusing the backend to serve the request instead of duplicating the code.