hid_unpack_value(guint8 *data, unsigned int idx, unsigned int size)
{
    guint32 value = 0;

    for(unsigned int i = 1; i <= size; i++)
        value |= data[idx + i] << (8 * (i - 1));

    return value;
}
hid_unpack_value(guint8 *data, unsigned int idx, unsigned int size)
{
    guint32 value = 0;

    for(unsigned int i = 1; i <= size; i++)
        value |= data[idx + i] << (8 * (i - 1));

    return value;
}