int android_set_low_priority(bdaddr_t *ba) { char *device = NULL; uint8_t array[8]; uint16_t on = 0; int ret = 0; if(ret = csr_open_hci(device)) { printf("csr_open_hci failure - ret:%d\n", ret); return ret; } printf("inquiry priority = %s \n", /*on? "low":*/ "default"); //bgkim ei30 prevent for GT-P6800 memset(array, 0, sizeof(array)); array[0] = on & 0xff; array[1] = on >> 8; if(ret = csr_write_hci(CSR_VARID_INQ_PRI, array, 8)) { printf("csr_write_hci failure \n"); return ret; } csr_close_hci(); return ret; }
static inline int transport_open(int transport, char *device) { switch (transport) { case CSR_TRANSPORT_HCI: return csr_open_hci(device); case CSR_TRANSPORT_USB: return csr_open_usb(device); case CSR_TRANSPORT_BCSP: return csr_open_bcsp(device); case CSR_TRANSPORT_H4: return csr_open_h4(device); case CSR_TRANSPORT_3WIRE: return csr_open_3wire(device); default: fprintf(stderr, "Unsupported transport\n"); return -1; } }