From 942bdeaec26eb587f39e9709dff0174bc4bfdd42 Mon Sep 17 00:00:00 2001 From: Ben Chan Date: Sat, 20 Oct 2018 20:20:54 -0700 Subject: modem-helpers: new helper to convert binary-coded decimals This patch adds a mm_bcd_to_string() helper function to convert a byte array representing a binary-coded decimal (BCD) number to a string representing the equivalent decimal number. --- src/mm-modem-helpers.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mm-modem-helpers.h') diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h index a2ee8254..71d8893e 100644 --- a/src/mm-modem-helpers.h +++ b/src/mm-modem-helpers.h @@ -88,6 +88,8 @@ GArray *mm_filter_supported_modes (const GArray *all, GArray *mm_filter_supported_capabilities (MMModemCapability all, const GArray *supported_combinations); +gchar *mm_bcd_to_string (const guint8 *bcd, gsize bcd_len); + /*****************************************************************************/ /* VOICE specific helpers and utilities */ /*****************************************************************************/ -- cgit v1.2.3-70-g09d2