def _get_flash_params(esp, args):
 detect_flash_size(esp, args)
 flash_mode = {'qio': 0, 'qout': 1, 'dio': 2, 'dout': 3}[args.flash_mode]
 flash_size_freq = esp.parse_flash_size_arg(args.flash_size)
 flash_size_freq += {'40m': 0, '26m': 1, '20m': 2, '80m': 15}[args.flash_freq]
 return struct.pack('BB', flash_mode, flash_size_freq)

def _get_flash_params ( esp , args ) : detect_flash_size ( esp , args ) flash_mode = { 'qio' : 0 , 'qout' : 1 , 'dio' : 2 , 'dout' : 3 } [ args . flash_mode ] flash_size_freq = esp . parse_flash_size_arg ( args . flash_size ) flash_size_freq += { '40m' : 0 , '26m' : 1 , '20m' : 2 , '80m' : 15 } [ args . flash_freq ] return struct . pack ( 'BB' , flash_mode , flash_size_freq )
return binary flash parameters for args .