From a73e2f9acb839a1f08d8bc5c7e6074c16f0cf1fe Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 4 Mar 2010 10:50:32 +0100 Subject: import bcd2char() and char2bcd() from OpenBSC --- include/osmocore/utils.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/osmocore/utils.h') diff --git a/include/osmocore/utils.h b/include/osmocore/utils.h index cf3b46072..51c6f0357 100644 --- a/include/osmocore/utils.h +++ b/include/osmocore/utils.h @@ -13,5 +13,8 @@ struct value_string { const char *get_value_string(const struct value_string *vs, uint32_t val); int get_string_value(const struct value_string *vs, const char *str); +char bcd2char(uint8_t bcd); +/* only works for numbers in ascci */ +uint8_t char2bcd(char c); #endif -- cgit v1.2.3