fwupd/plugins/logitech-hidpp/fu-logitech-hidpp-common.h
Ricardo Cañuelo 15a39b94ee logitech-hidpp: Add support for updating Bolt peripheral firmware
Also simplify the Instance IDs added by the Bolt hardware.
2021-09-13 11:28:55 +01:00

36 lines
1.0 KiB
C

/*
* Copyright (C) 2016 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include <glib.h>
#define FU_UNIFYING_DEVICE_VID 0x046d
#define FU_UNIFYING_DEVICE_PID_RUNTIME 0xc52b
#define FU_UNIFYING_DEVICE_PID_BOOTLOADER_NORDIC 0xaaaa
#define FU_UNIFYING_DEVICE_PID_BOOTLOADER_NORDIC_PICO 0xaaae
#define FU_UNIFYING_DEVICE_PID_BOOTLOADER_TEXAS 0xaaac
#define FU_UNIFYING_DEVICE_PID_BOOTLOADER_TEXAS_PICO 0xaaad
#define FU_UNIFYING_DEVICE_PID_BOOTLOADER_BOLT 0xab07
/* Signed firmware are very long to verify on the device */
#define FU_UNIFYING_DEVICE_TIMEOUT_MS 30000
/* Polling intervals (ms) */
#define FU_HIDPP_DEVICE_POLLING_INTERVAL 30000
#define FU_HIDPP_RECEIVER_RUNTIME_POLLING_INTERVAL 5000
#define FU_HIDPP_VERSION_BLE 0xFE
guint8
fu_logitech_hidpp_buffer_read_uint8(const gchar *str);
guint16
fu_logitech_hidpp_buffer_read_uint16(const gchar *str);
gchar *
fu_logitech_hidpp_format_version(const gchar *name, guint8 major, guint8 minor, guint16 build);