diff options
| author | Jerzy Kasenberg <[email protected]> | 2020-09-11 13:13:25 +0200 |
|---|---|---|
| committer | Jerzy Kasenberg <[email protected]> | 2020-09-28 08:41:17 +0200 |
| commit | e67fc808aada31a549399a0b0337b43ec45535d1 (patch) | |
| tree | 03a7e4ed371c568799b758ee86fb0abbe49c901a /src/class | |
| parent | f4a44ee06337366680958013143657aa693c80ef (diff) | |
audio_device: Store rhport in interface data
Some API uses interface number as argument, some wants to have
rhport.
To accommodate need of rhport for functions that don't have it
rhport can be extracted from interface data.
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/audio/audio_device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/class/audio/audio_device.c b/src/class/audio/audio_device.c index ebb8434cd..fd24d455c 100644 --- a/src/class/audio/audio_device.c +++ b/src/class/audio/audio_device.c @@ -48,6 +48,7 @@ //--------------------------------------------------------------------+ typedef struct { + uint8_t rhport; uint8_t const * p_desc; // Pointer pointing to Standard AC Interface Descriptor(4.7.1) - Audio Control descriptor defining audio function #if CFG_TUD_AUDIO_EPSIZE_IN @@ -673,6 +674,7 @@ uint16_t audiod_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, uin if (!_audiod_itf[i].p_desc) { _audiod_itf[i].p_desc = (uint8_t const *)itf_desc; // Save pointer to AC descriptor which is by specification always the first one + _audiod_itf[i].rhport = rhport; break; } } |
