Add hex to int helper function.

This commit is contained in:
Mikaël Ates 2016-01-08 12:22:09 +01:00
parent 3d3cbffa2e
commit a8b662fcb1
1 changed files with 3 additions and 0 deletions

View File

@ -48,3 +48,6 @@ def get_crc_16_CCITT(string):
def switch_big_to_little_indian(string):
return string[::-1]
def hex_to_int(hex_value):
return int(hex_value.encode('hex'), 16)