diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-24 10:21:04 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-24 10:21:04 -0600 |
commit | 9ae823595a6f77cd55ed91a2dd23d152a5e385c4 (patch) | |
tree | 1b9245f74c51d387e5d5d795d5ad71888175a7be /nuttx/include | |
parent | 9ee5cdfd37157507a9b40d4554b407037b6e2c77 (diff) | |
download | px4-nuttx-9ae823595a6f77cd55ed91a2dd23d152a5e385c4.tar.gz px4-nuttx-9ae823595a6f77cd55ed91a2dd23d152a5e385c4.tar.bz2 px4-nuttx-9ae823595a6f77cd55ed91a2dd23d152a5e385c4.zip |
Convert ac_format and ac_controls to unions to make access a little cleaner
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/audio/audio.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/nuttx/include/nuttx/audio/audio.h b/nuttx/include/nuttx/audio/audio.h index 0230437b7..761159d87 100644 --- a/nuttx/include/nuttx/audio/audio.h +++ b/nuttx/include/nuttx/audio/audio.h @@ -300,10 +300,19 @@ struct audio_caps_s uint8_t ac_type; /* Capabilities (device) type */ uint8_t ac_subtype; /* Capabilities sub-type, if needed */ uint8_t ac_channels; /* Number of channels (1, 2, 5, 7) */ - uint8_t ac_format[2]; /* Audio data format(s) for this device */ - uint8_t ac_controls[4]; /* Device specific controls. For AUDIO_DEVICE_QUERY, - * this field reports the device type supported - * by this lower-half driver. */ + + union /* Audio data format(s) for this device */ + { + uint8_t b[2]; + uint16_t hw; + } ac_format; + + union /* Device specific controls. For AUDIO_DEVICE_QUERY, */ + { /* this field reports the device type supported */ + uint8_t b[4]; /* by this lower-half driver. */ + uint16_t hw[2]; + uint32_t w; + } ac_controls; }; struct audio_caps_desc_s |