From ad633b09192dd8edc2952f992abfc96d4fe04940 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 1 Dec 2011 21:08:19 +0100 Subject: SMS: export gsm411_bcdify() and gsm411_unbcdify() functions The same functions are e.g. required by the NITZ code in 04.08, and we don't want copy+paste. --- include/osmocom/gsm/gsm0411_utils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/gsm0411_utils.h b/include/osmocom/gsm/gsm0411_utils.h index a030f581..d29ca631 100644 --- a/include/osmocom/gsm/gsm0411_utils.h +++ b/include/osmocom/gsm/gsm0411_utils.h @@ -1,6 +1,12 @@ #ifndef _GSM0411_UTILS_H #define _GSM0411_UTILS_H +/* Turn int into semi-octet representation: 98 => 0x89 */ +uint8_t gsm411_bcdify(uint8_t value); + +/* Turn semi-octet representation into int: 0x89 => 98 */ +uint8_t gsm411_unbcdify(uint8_t value); + struct msgb *gsm411_msgb_alloc(void); /* Generate 03.40 TP-SCTS */ -- cgit v1.2.3