Re: [PATCH_v3 02/04] android/hid: Implement hid set protocol in daemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On 11/05/2013 03:12 PM, Johan Hedberg wrote:
Hi Ravi,

On Tue, Nov 05, 2013, Ravi kumar Veeramally wrote:
  static uint8_t bt_hid_set_protocol(struct hal_cmd_hid_set_protocol *cmd,
  								uint16_t len)
  {
-	DBG("Not Implemented");
+	struct hid_device *dev;
+	GSList *l;
+	bdaddr_t dst;
+	int fd;
+	uint8_t hdr[1];
If it's just one element there's no need for an array. Just use
"uint8_t hdr;" instead.

+	hdr[0] = HID_MSG_SET_PROTOCOL | cmd->mode;
And then here hdr = ...;

+	fd = g_io_channel_unix_get_fd(dev->ctrl_io);
+
+	if (write(fd, hdr, sizeof(hdr)) < 0) {
And here &hdr, sizeof(hdr)
 Ok.

Thanks,
Ravi.
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux