From 769ed325837271b76beca1e74a037cf8bb91f4b3 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 4 May 2016 19:56:40 +0200 Subject: Factor out bcd2int() into common/srdhelper. --- decoders/rtc8564/pd.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'decoders/rtc8564/pd.py') diff --git a/decoders/rtc8564/pd.py b/decoders/rtc8564/pd.py index 24a68fb..258ec27 100644 --- a/decoders/rtc8564/pd.py +++ b/decoders/rtc8564/pd.py @@ -19,10 +19,7 @@ ## import sigrokdecode as srd - -# Return the specified BCD number (max. 8 bits) as integer. -def bcd2int(b): - return (b & 0x0f) + ((b >> 4) * 10) +from srdhelper import bcd2int def reg_list(): l = [] -- cgit v1.2.3-70-g09d2