26 #define MINIDSP_VID 0x2752
27 #define MINIDSP_PID 0x0011
63 pFuncOnInit = funcOnInit;
73 pFuncOnVolumeChange = funcOnVolumeChange;
83 pFuncOnMutedChange = funcOnMutedChange;
101 return volume / -2.0;
141 virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
153 uint8_t Checksum(
const uint8_t *data, uint8_t data_length)
const;
160 RequestStatus()
const;
169 void SendCommand(uint8_t *command, uint8_t command_length)
const;
174 void (*pFuncOnInit)(void) =
nullptr;
177 void (*pFuncOnVolumeChange)(uint8_t) =
nullptr;
180 void (*pFuncOnMutedChange)(bool) =
nullptr;
void attachOnInit(void(*funcOnInit)(void))
uint8_t OnInitSuccessful()
void attachOnVolumeChange(void(*funcOnVolumeChange)(uint8_t))
void attachOnMutedChange(void(*funcOnMutedChange)(bool))
float getVolumeDB() const
void ParseHIDData(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)