/****************************
 File name: SonyBtRcDet.c
 Release date: 2017/02/15
****************************/

#include <string.h>

#define SONYBTRCDET_DEF_PRM
#include "SonyBtRcDet.h"
#undef SONYBTRCDET_DEF_PRM

/********************************************
 Function name:
  sonybtrc_is_connected
 Arguments:
  char *dev_name
      Pointer for "Device Name" data array
  __s16 vendor
      Vendor ID value
  __s16 product
      Product ID value
 Return value:
  type: int
   0...detecting as NOT Sony Voice Remote
   1...detecting as Sony Voice Remote
********************************************/

int sonybtrc_is_connected(char *dev_name, int16_t vendor, int16_t product)
{
    int i;
    int ret = 0;

    for (i = 0; i < param_table.num; i++)
    {
        if ((strcmp(dev_name, param_table.list[i].dev_name) == 0) &&
            (vendor == param_table.list[i].vendor) &&
            (product == param_table.list[i].product))
        {
            ret = 1;
            break;
        }
    }

    return ret;
}
