Skip to content

Commit f0dc9f4

Browse files
committed
Normalizes the case in the PowerSequence read from the .cid file (needed for the 16f88 entry)
1 parent 75bdff8 commit f0dc9f4

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

picpro.py

+16-16
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,20 @@ class Chipinfo_Entry(object):
179179
class Fuse_Error(Exception):
180180
"Indicates an erroneous fuse value."
181181

182-
power_sequence_dict = {'Vcc' : 0,
183-
'VccVpp1' : 1,
184-
'VccVpp2' : 2,
185-
'Vpp1Vcc' : 3,
186-
'Vpp2Vcc' : 4,
187-
'VccFastVpp1' : 1,
188-
'VccFastVpp2' : 2}
189-
vcc_vpp_delay_dict = {'Vcc' : False,
190-
'VccVpp1' : False,
191-
'VccVpp2' : False,
192-
'Vpp1Vcc' : False,
193-
'Vpp2Vcc' : False,
194-
'VccFastVpp1' : True,
195-
'VccFastVpp2' : True}
182+
power_sequence_dict = {'vcc' : 0,
183+
'vccvpp1' : 1,
184+
'vccvpp2' : 2,
185+
'vpp1vcc' : 3,
186+
'vpp2vcc' : 4,
187+
'vccfastvpp1' : 1,
188+
'vccfastvpp2' : 2}
189+
vcc_vpp_delay_dict = {'vcc' : False,
190+
'vccvpp1' : False,
191+
'vccvpp2' : False,
192+
'vpp1vcc' : False,
193+
'vpp2vcc' : False,
194+
'vccfastvpp1' : True,
195+
'vccfastvpp2' : True}
196196
socket_image_dict = {'8pin' : 'socket pin 13',
197197
'14pin' : 'socket pin 13',
198198
'18pin' : 'socket pin 2',
@@ -211,7 +211,7 @@ def __init__(self,
211211
'SocketImage' : SocketImage,
212212
'erase_mode' : EraseMode,
213213
'FlashChip' : FlashChip,
214-
'power_sequence' : self.power_sequence_dict[PowerSequence],
214+
'power_sequence' : self.power_sequence_dict[PowerSequence.lower()],
215215
'power_sequence_str' : PowerSequence,
216216
'program_delay' : ProgramDelay,
217217
'program_tries' : ProgramTries,
@@ -237,7 +237,7 @@ def get_programming_vars(self):
237237
flag_band_gap_fuse = self.vars['flag_band_gap_fuse'],
238238
# T.Nixon says this is the rule for this flag.
239239
flag_18f_single_panel_access_mode = (self.vars['core_type'] == Chipinfo_Reader.core_type_dict['bit16_a']),
240-
flag_vcc_vpp_delay = self.vcc_vpp_delay_dict[self.vars['power_sequence_str']],
240+
flag_vcc_vpp_delay = self.vcc_vpp_delay_dict[self.vars['power_sequence_str'].lower()],
241241
program_delay = self.vars['program_delay'],
242242
power_sequence = self.vars['power_sequence'],
243243
erase_mode = self.vars['erase_mode'],

0 commit comments

Comments
 (0)