diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-07 15:32:40 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2013-10-07 15:32:40 -0700 |
commit | 4feaf68bf2730641adaba09c98d88d7ee5506f24 (patch) | |
tree | d8bad7e9ff054d7ca12e2a777604a00e57bd8492 | |
parent | 0ab01d55a5ab256f85aed0bb3d3ded2488d6c544 (diff) |
lib: Add special functions for PAL version mapping
-rw-r--r-- | lib/hci.c | 15 | ||||
-rw-r--r-- | lib/hci_lib.h | 2 |
2 files changed, 17 insertions, 0 deletions
@@ -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); |