summaryrefslogtreecommitdiffstats
path: root/btif/src/btif_storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'btif/src/btif_storage.c')
-rw-r--r--btif/src/btif_storage.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c
index 7fdb5141d..36bafa981 100644
--- a/btif/src/btif_storage.c
+++ b/btif/src/btif_storage.c
@@ -1505,3 +1505,36 @@ BOOLEAN btif_storage_is_restricted_device(const bt_bdaddr_t *remote_bd_addr)
return btif_config_exist(bdstr, "Restricted");
}
+
+static const char *wii_names[4] = {
+ "Nintendo RVL-CNT-01", /* 1st gen */
+ "Nintendo RVL-CNT-01-TR", /* 2nd gen */
+ "Nintendo RVL-CNT-01-UC", /* Wii U Pro Controller */
+ "Nintendo RVL-WBC-01", /* Balance Board */
+};
+
+/*******************************************************************************
+**
+** Function btif_storage_is_wiimote
+**
+** Description BTIF storage API - checks if this device is a wiimote
+**
+** Returns TRUE if the device is found in wiimote device list
+** FALSE otherwise
+**
+*******************************************************************************/
+BOOLEAN btif_storage_is_wiimote(bt_bdaddr_t *remote_bd_addr, bt_bdname_t *remote_bd_name)
+{
+ uint8_t wii_names_size = sizeof(wii_names) / sizeof(wii_names[0]);
+ uint8_t i = 0;
+
+ /* Check device name */
+ for (i = 0; i < wii_names_size; i++)
+ {
+ if (!strcmp((char*)remote_bd_name->name, wii_names[i]))
+ return TRUE;
+ }
+
+ return FALSE;
+
+}