summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-10-07 15:32:40 -0700
committerMarcel Holtmann <marcel@holtmann.org>2013-10-07 15:32:40 -0700
commit4feaf68bf2730641adaba09c98d88d7ee5506f24 (patch)
treed8bad7e9ff054d7ca12e2a777604a00e57bd8492 /lib
parent0ab01d55a5ab256f85aed0bb3d3ded2488d6c544 (diff)
lib: Add special functions for PAL version mapping
Diffstat (limited to 'lib')
-rw-r--r--lib/hci.c15
-rw-r--r--lib/hci_lib.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/hci.c b/lib/hci.c
index 7a06dc5f4..6e3783671 100644
--- a/lib/hci.c
+++ b/lib/hci.c
@@ -672,6 +672,21 @@ int lmp_strtover(char *str, unsigned int *ver)
return hci_str2uint(ver_map, str, ver);
}
+static hci_map pal_map[] = {
+ { "3.0", 0x01 },
+ { NULL }
+};
+
+char *pal_vertostr(unsigned int ver)
+{
+ return hci_uint2str(pal_map, ver);
+}
+
+int pal_strtover(char *str, unsigned int *ver)
+{
+ return hci_str2uint(pal_map, str, ver);
+}
+
/* LMP features mapping */
static hci_map lmp_features_map[8][9] = {
{ /* Byte 0 */
diff --git a/lib/hci_lib.h b/lib/hci_lib.h
index cf4a0ff10..50744c3ba 100644
--- a/lib/hci_lib.h
+++ b/lib/hci_lib.h
@@ -158,6 +158,8 @@ char *hci_vertostr(unsigned int ver);
int hci_strtover(char *str, unsigned int *ver);
char *lmp_vertostr(unsigned int ver);
int lmp_strtover(char *str, unsigned int *ver);
+char *pal_vertostr(unsigned int ver);
+int pal_strtover(char *str, unsigned int *ver);
char *lmp_featurestostr(uint8_t *features, char *pref, int width);