From: Szymon Janc <szymon.janc@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Janc <szymon.janc@tieto.com>
Subject: [PATCH 1/2] android/bluetooth: Add function for getting device Android type
Date: Sat, 26 Apr 2014 17:26:13 +0200 [thread overview]
Message-ID: <1398525974-3672-1-git-send-email-szymon.janc@tieto.com> (raw)
This will be used by GATT HAL.
---
android/bluetooth.c | 9 +++++++++
android/bluetooth.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/android/bluetooth.c b/android/bluetooth.c
index 7d82aba..20455e3 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -1180,6 +1180,15 @@ static uint8_t get_device_android_type(struct device *dev)
return HAL_TYPE_BREDR;
}
+uint8_t bt_get_device_android_type(const bdaddr_t *addr)
+{
+ struct device *dev;
+
+ dev = get_device(addr, BDADDR_BREDR);
+
+ return get_device_android_type(dev);
+}
+
static bool rssi_above_threshold(int old, int new)
{
/* only 8 dBm or more */
diff --git a/android/bluetooth.h b/android/bluetooth.h
index 634458f..649c9ba 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
@@ -46,3 +46,5 @@ bool bt_le_discovery_stop(bt_le_discovery_stopped cb);
typedef void (*bt_le_set_advertising_done)(uint8_t status, void *user_data);
bool bt_le_set_advertising(bool advertising, bt_le_set_advertising_done cb,
void *user_data);
+
+uint8_t bt_get_device_android_type(const bdaddr_t *addr);
--
1.9.0
next reply other threads:[~2014-04-26 15:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-26 15:26 Szymon Janc [this message]
2014-04-26 15:26 ` [PATCH 2/2] android/gatt: Implement get device type command Szymon Janc
2014-04-28 12:12 ` [PATCH 1/2] android/bluetooth: Add function for getting device Android type Szymon Janc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398525974-3672-1-git-send-email-szymon.janc@tieto.com \
--to=szymon.janc@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox