Skip to content

Commit f868ef8

Browse files
committed
Add a flashy warning that eeprom will be overwritten
1 parent 58ced98 commit f868ef8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

configure_DS3231/load_eeprom.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ def get_checksum(value):
1111
return checksum
1212

1313

14+
def do_warning():
15+
flash = "\x1b[5m"
16+
no_flash = "\x1b[0m"
17+
print(flash + "\n\n\x1b[31mWARNING: This script will overwrite the EEPROM of the device connected to the specified serial port.\x1b[0m\n\n" + no_flash)
18+
time.sleep(20)
19+
20+
1421
def main():
22+
do_warning()
1523
print('xxd -c 32 dumpfile.out')
1624
serial_device = sys.argv[1]
1725
filename = sys.argv[2]

0 commit comments

Comments
 (0)