#pragma once /* Shared HID mixer protocol (firmware + host) */ #define AUSIO_USB_VID 0x2E8Au #define AUSIO_USB_PID 0xA541u #define AUSIO_REPORT_ID_INPUT 1 #define AUSIO_REPORT_ID_OUTPUT 2 #define AUSIO_INPUT_SIZE 8 /* including report id */ #define AUSIO_OUTPUT_SIZE 64 /* including report id */ #define AUSIO_FLAG_E1_SW 0x01u #define AUSIO_FLAG_E2_SW 0x02u #define AUSIO_NAME_CHARS 12 #define AUSIO_SLOT_SIZE (1 + AUSIO_NAME_CHARS + 1) /* vol + name + NUL */ #define AUSIO_MAX_VISIBLE 4 #define AUSIO_HDR_SIZE 6 #if (AUSIO_HDR_SIZE + AUSIO_MAX_VISIBLE * AUSIO_SLOT_SIZE) > AUSIO_OUTPUT_SIZE #error protocol packing overflow #endif /* * Input report (device -> host), 8 bytes: * [0] report_id = 1 * [1] enc1_delta int8 * [2] enc2_delta int8 * [3] flags * [4] pot 0..100 * [5..7] reserved * * Output report (host -> device), 64 bytes: * [0] report_id = 2 * [1] session_count * [2] selected_index * [3] master_vol 0..100 * [4] page_start * [5] n_visible (0..4) * [6..] slots: { uint8 vol; char name[9]; char nul; } * n_visible */