diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-03-27 14:43:44 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-03-27 14:43:44 +0000 |
commit | 4c2d1cbe438713b5d6c350ee0983e1d312c69823 (patch) | |
tree | 477590f16366f1ce3bae4b4a034de309f2f32fd0 /src/bluetooth.c | |
parent | 9280b803576dc54bfc7f51c8e5154d1f29692991 (diff) |
Add ba2oui() function
Diffstat (limited to 'src/bluetooth.c')
-rw-r--r-- | src/bluetooth.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bluetooth.c b/src/bluetooth.c index 484b263b..0f4c49e6 100644 --- a/src/bluetooth.c +++ b/src/bluetooth.c @@ -106,6 +106,14 @@ int str2ba(const char *str, bdaddr_t *ba) return 0; } +int ba2oui(const bdaddr_t *ba, char *str) +{ + uint8_t b[6]; + + baswap((bdaddr_t *) b, ba); + return sprintf(str, "%2.2X-%2.2X-%2.2X", b[0], b[1], b[2]); +} + int baprintf(const char *format, ...) { va_list ap; |