RA Flexible Software Package Documentation  Release v6.2.0

 
USB HAUD Interface

Detailed Description

Interface for USB HAUD functions.

Summary

The USB HAUD interface provides USB HAUD functionality.

Data Structures

struct  usb_haud_sampling_t
 
struct  usb_haud_device_info_t
 
struct  usb_haud_api_t
 

Data Structure Documentation

◆ usb_haud_sampling_t

struct usb_haud_sampling_t

Sampling Frequency Settings

Data Fields
uint32_t channels User Input Parameter : Number of channels.
uint32_t frequency User Input Parameter : Sampling frequency.
uint32_t resolution User Input Parameter : bits per sample.
uint8_t frequency_setting Whether the frequency needs to be set to device.
uint8_t alternate_setting Whether the ALT number is set.
uint32_t interface_number Set by HAUD Driver : Interface number.
uint32_t alternate_number Set by HAUD Driver : Alternate number.
uint8_t * p_sampling_descriptor Set by HAUD Driver : Pointer to Audio Streaming Format Type Descriptor (Audio1.0)
uint16_t max_packet_size Set by HAUD Driver : Max Packet Size.
uint8_t endpoint_address Set by HAUD Driver : Endpoint Address.

◆ usb_haud_device_info_t

struct usb_haud_device_info_t

Audio protocol data

Data Fields
uint8_t protocol Protocol code.

◆ usb_haud_api_t

struct usb_haud_api_t

USB HAUD functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* infoGet )(usb_ctrl_t *const p_ctrl, usb_haud_device_info_t *p_info, uint8_t device_address)
 
fsp_err_t(* alternateNumberGet )(usb_ctrl_t *const p_ctrl, usb_haud_sampling_t *p_info, uint8_t direction, uint8_t device_address)
 
fsp_err_t(* pipeSet )(usb_ctrl_t *const p_ctrl, uint32_t interface_number, uint32_t alternate_number, uint8_t device_address)
 

Field Documentation

◆ infoGet

fsp_err_t(* usb_haud_api_t::infoGet) (usb_ctrl_t *const p_ctrl, usb_haud_device_info_t *p_info, uint8_t device_address)

Get connected device information.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_infoPointer to store Audio device information.
[in]device_addressDevice address.

◆ alternateNumberGet

fsp_err_t(* usb_haud_api_t::alternateNumberGet) (usb_ctrl_t *const p_ctrl, usb_haud_sampling_t *p_info, uint8_t direction, uint8_t device_address)

Get alternate number and related information.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_infoPointer to store Audio device information.
[in]directionStreaming data direction.
[in]device_addressDevice address.

◆ pipeSet

fsp_err_t(* usb_haud_api_t::pipeSet) (usb_ctrl_t *const p_ctrl, uint32_t interface_number, uint32_t alternate_number, uint8_t device_address)

Pipe Setting.

Parameters
[in]p_ctrlPointer to control structure.
[in]interface_numberInterface number used in SET_INTERFACE.
[in]alternate_numberAlternate number used in SET_INTERFACE.
[in]device_addressDevice address.