INNER CODE UNIT · Python
get_device_size
xoseperez/espurna · code/ota.py:162
def get_device_size(device):
if device.get("mem_size", 0) == device.get("sdk_size", 0):
return int(device.get("mem_size", 0)) // 1024
return 0
def get_empty_board():
"""
Returns the empty structure of a board to flash
"""
board = {"board": "", "ip": "", "size": 0, "auth": "", "flags": ""}
return board
def get_board_by_index(devices, index):
"""
Returns the required data to flash a given board
"""