143 #define BT_AWS_CONNECT_IND (BT_MODULE_AWS | 0x0001) 144 #define BT_AWS_CONNECT_CNF (BT_MODULE_AWS | 0x0002) 145 #define BT_AWS_DISCONNECT_IND (BT_MODULE_AWS | 0x0003) 146 #define BT_AWS_DISCONNECT_CNF (BT_MODULE_AWS | 0x0004) 147 #define BT_AWS_COMMAND_IND (BT_MODULE_AWS | 0x000C) 148 #define BT_AWS_NOTIFY_PLAY_IND (BT_MODULE_AWS | 0x000E) 149 #define BT_AWS_STREAMING_PACKET_RECEIVED_IND (BT_MODULE_AWS | 0x0013) 150 #define BT_AWS_OFFSET_UPDATE_IND (BT_MODULE_AWS | 0x0015) 151 #define BT_AWS_BT_CLOCK_IND (BT_MODULE_AWS | 0x0016) 166 #define BT_AWS_STREAMING_TYPE_A2DP 0X01 167 #define BT_AWS_STREAMING_TYPE_CUSTOM 0X02 370 uint16_t data_length);
bt_status_t bt_aws_fetch_bt_time_offset(uint32_t handle)
This function fetches the current Bluetooth clock offset.
bt_status_t bt_aws_connect(uint32_t *handle, bt_bd_addr_t *address)
This function sends an AWS connection request to the remote device.
uint8_t * data_node
Media data pointer.
Definition: bt_aws.h:194
bt_aws_a2dp_packet_t a2dp_packet
The A2DP packet.
Definition: bt_aws.h:218
uint32_t offset_intra
The Bluetooth clock offset in microseconds.
Definition: bt_aws.h:186
This structure defines the Bluetooth clock.
Definition: bt_aws.h:173
uint32_t offset
The Bluetooth clock offset in 312.5us units.
Definition: bt_aws.h:185
This structure defines the BT_AWS_DISCONNECT_IND result.
Definition: bt_aws.h:259
This structure defines the BT_AWS_CONNECT_CNF result.
Definition: bt_aws.h:250
This structure defines the BT_AWS_DISCONNECT_CNF result.
Definition: bt_aws.h:267
bt_status_t bt_aws_get_bt_time_by_local_time(bt_role_t role, bt_aws_clock_offset_t offset, bt_aws_clock_t local_clock, bt_aws_clock_t *bt_clock)
This function gets the current Bluetooth clock.
uint16_t total_length
The total length of a media packet.
Definition: bt_aws.h:195
This structure defines the BT_AWS_COMMAND_IND result.
Definition: bt_aws.h:276
uint16_t bt_aws_module_id_t
This structure defines the module ID.
Definition: bt_aws.h:159
This structure defines the A2DP packet.
Definition: bt_aws.h:193
uint8_t bt_role_t
Define the role type.
Definition: bt_type.h:98
bt_status_t bt_aws_get_curr_bt_time(bt_role_t role, bt_aws_clock_offset_t offset, bt_aws_clock_t *bt_clock)
This function gets the current Bluetooth clock.
uint8_t * media_header
The media header pointer.
Definition: bt_aws.h:206
uint16_t media_header_len
The media header length.
Definition: bt_aws.h:207
bt_status_t bt_aws_disconnect(uint32_t handle)
This function sends an AWS disconnect request to the remote device.
uint16_t media_offset
The offset of media payload from the whole packet.
Definition: bt_aws.h:196
This structure defines the BT_AWS_BT_CLOCK_IND result.
Definition: bt_aws.h:297
This structure defines the AWS play time with a notification ID #BT_AWS_NOTIFY_ID_READY_TO_PLAY.
Definition: bt_aws.h:227
This structure defines the result of the BT_AWS_CONNECT_IND event.
Definition: bt_aws.h:241
bt_aws_module_id_t module_id
The module ID.
Definition: bt_aws.h:278
This structure defines the AWS streaming packet.
Definition: bt_aws.h:214
This structure defines the Bluetooth clock offset.
Definition: bt_aws.h:183
bt_status_t bt_aws_notify_play(uint32_t handle, bt_aws_module_id_t module_id, bt_aws_play_notify_t *notification)
This function sends an AWS notification to the remote device.
uint16_t bt_aws_send_streaming_packet(uint32_t handle, bt_aws_module_id_t module_id, bt_aws_streaming_packet_t *streaming_packet)
This function sends the streaming data to the remote device.
This structure defines the BT_AWS_NOTIFY_PLAY_IND result.
Definition: bt_aws.h:306
uint32_t data_len
The user data length.
Definition: bt_aws.h:233
uint32_t bt_aws_get_max_streaming_packet_size(uint32_t handle)
Get the max streaming data length.
uint32_t play_time
The delay time in microseconds.
Definition: bt_aws.h:229
This structure defines the custom packet.
Definition: bt_aws.h:203
bt_aws_clock_t play_bt_clock
The Bluetooth clock during play.
Definition: bt_aws.h:231
bt_role_t bt_local_role
The Bluetooth role.
Definition: bt_aws.h:232
bt_status_t bt_aws_send_command(uint32_t handle, bt_aws_module_id_t module_id, const uint8_t *data, uint16_t data_length)
This function sends an AWS command to the remote device.
uint8_t bt_bd_addr_t[6]
Address type, defined in Bluetooth core specification version 4.2.
Definition: bt_type.h:180
int32_t bt_status_t
Define the status type, returned from the APIs, and defined as BT_STATUS_XXX.
Definition: bt_type.h:173
uint16_t data_length
The total length of media packet.
Definition: bt_aws.h:205
uint32_t nclk_intra
The Bluetooth clock in microseconds.
Definition: bt_aws.h:176
uint8_t * user_data
The user data.
Definition: bt_aws.h:234
bt_aws_custom_packet_t custom_packet
The customized packet.
Definition: bt_aws.h:219
bt_aws_clock_t bt_clock
The current Bluetooth clock offset.
Definition: bt_aws.h:299
bt_bd_addr_t * address
Bluetooth address of a remote device.
Definition: bt_aws.h:243
uint32_t nclk
The Bluetooth clock in 312.5us units.
Definition: bt_aws.h:175
This structure defines the BT_AWS_STREAMING_PACKET_RECEIVED_IND result.
Definition: bt_aws.h:316
bt_aws_streaming_packet_t packet
The streaming packet.
Definition: bt_aws.h:319
bt_aws_clock_offset_t offset
The Bluetooth clock offset.
Definition: bt_aws.h:289
bt_status_t bt_aws_get_bt_local_time(bt_aws_clock_t *native_clock)
This function gets the current native clock.
uint32_t sequence_num
The packet sequence number.
Definition: bt_aws.h:230
uint8_t bt_aws_streaming_type_t
This structure defines the streaming packet type.
Definition: bt_aws.h:165
bt_status_t bt_aws_connect_response(uint32_t handle, bool accept)
This function is a response to the remote device's incoming connection request.
uint8_t * data
Media data pointer.
Definition: bt_aws.h:204
uint32_t handle
AWS handle.
Definition: bt_aws.h:242
This structure defines the BT_AWS_OFFSET_UPDATE_IND result.
Definition: bt_aws.h:287
bt_aws_streaming_type_t type
The streaming type.
Definition: bt_aws.h:215
bt_aws_play_notify_t * play_notify
The play notification settings.
Definition: bt_aws.h:309
bt_status_t status
Connection status.
Definition: bt_aws.h:252