35 #ifndef __BT_SYSTEM_H__ 36 #define __BT_SYSTEM_H__ 38 #include "bt_platform.h" 108 #define BT_CONTROL_BLOCK_SIZE_OF_TIMER (20) 109 #define BT_CONTROL_BLOCK_SIZE_OF_LE_CONNECTION (100) 110 #define BT_CONTROL_BLOCK_SIZE_OF_EDR_CONNECTION (56) 111 #define BT_CONTROL_BLOCK_SIZE_OF_RFCOMM (48) 112 #define BT_CONTROL_BLOCK_SIZE_OF_HFP (76) 113 #define BT_CONTROL_BLOCK_SIZE_OF_AVRCP (48) 114 #define BT_CONTROL_BLOCK_SIZE_OF_A2DP_SEP (16) 115 #define BT_CONTROL_BLOCK_SIZE_OF_A2DP (132) 116 #define BT_CONTROL_BLOCK_SIZE_OF_PBAPC (100) 117 #define BT_CONTROL_BLOCK_SIZE_OF_SPP (44) 118 #define BT_CONTROL_BLOCK_SIZE_OF_AWS (100) 119 #define BT_CONTROL_BLOCK_SIZE_OF_GATT (32) 149 #define BT_MEMORY_TX_BUFFER_AVAILABLE_IND (BT_MODULE_MM | 0x00010000) 150 #define BT_MEMORY_FREE_GARBAGE_IND (BT_MODULE_MM | 0x00010001) 261 #define BT_PANIC (BT_MODULE_SYSTEM | 0x0003) 267 #define BT_PANIC_SOURCE_HOST 0 268 #define BT_PANIC_SOURCE_CONTROLLER 1 339 #define BT_POWER_ON_CNF (BT_MODULE_SYSTEM | 0x0001) 340 #define BT_POWER_OFF_CNF (BT_MODULE_SYSTEM | 0x0002) AVRCP.
Definition: bt_system.h:129
const bt_bd_addr_t local_public_addr
The local public address of the device.
Definition: bt_system.h:356
uint8_t bt_max_tx_power_level
Maximum level of bt connection radio transmission power.
Definition: bt_system.h:364
A2DP.
Definition: bt_system.h:132
RFCOMM.
Definition: bt_system.h:128
void bt_memory_init_control_block(bt_memory_control_block_t type, char *buf, uint32_t size)
This function initializes a control block buffer for the Bluetooth stack.
uint8_t le_init_tx_power_level
Initial level of le connection radio transmission power.
Definition: bt_system.h:365
bt_status_t bt_power_on(bt_bd_addr_ptr_t public_addr, bt_bd_addr_ptr_t random_addr)
This function powers on the Bluetooth.
uint32_t size
The size of available TX buffer in bytes.
Definition: bt_system.h:168
uint8_t const * bt_bd_addr_ptr_t
A pointer to the bt_bd_addr_t.
Definition: bt_type.h:181
BR/EDR connection.
Definition: bt_system.h:127
uint8_t source
The source for the panic, such as BT_PANIC_SOURCE_HOST or BT_PANIC_SOURCE_CONTROLLER.
Definition: bt_system.h:285
bt_memory_control_block_t
Bluetooth memory control block types.
Definition: bt_system.h:124
GATT.
Definition: bt_system.h:136
Bluetooth LE connection.
Definition: bt_system.h:126
TX buffer availability indication.
Definition: bt_system.h:167
SPP.
Definition: bt_system.h:134
bt_status_t bt_power_off(void)
This function powers off the Bluetooth.
uint8_t bt_init_tx_power_level
Initial level of bt connection radio transmission power.
Definition: bt_system.h:363
uint32_t bt_msg_type_t
Define the message type.
Definition: bt_type.h:130
PBAPC.
Definition: bt_system.h:130
AWS.
Definition: bt_system.h:135
the Bluetooth panic event parameter.
Definition: bt_system.h:284
HFP.
Definition: bt_system.h:133
Timer.
Definition: bt_system.h:125
uint8_t bt_bd_addr_t[6]
Address type, defined in Bluetooth core specification version 4.2.
Definition: bt_type.h:180
RX packet buffer.
Definition: bt_system.h:146
int32_t bt_status_t
Define the status type, returned from the APIs, and defined as BT_STATUS_XXX.
Definition: bt_type.h:173
A2DP SEP.
Definition: bt_system.h:131
bt_status_t bt_app_event_callback(bt_msg_type_t msg, bt_status_t status, void *buf)
This function is a static callback for the application to listen to the event.
Power on confirmation structure.
Definition: bt_system.h:355
bt_status_t bt_config_tx_power_level(const bt_config_tx_power_t *tx_power_info)
This function configurates the radio transmission power level for bt and le connections.
This structure defines the detail information about config tx power level.
Definition: bt_system.h:362
void bt_memory_init_packet(bt_memory_packet_t type, char *buf, uint32_t size)
This function initializes a TX/RX packet buffer for the Bluetooth stack.
bt_memory_packet_t
Bluetooth memory buffer types for the Memory Management module.
Definition: bt_system.h:144
The total number of memory control block types.
Definition: bt_system.h:137
TX packet buffer.
Definition: bt_system.h:145
void * bt_alloc_rx_buffer_from_external(uint32_t buffer_size)
This function is for memory allocation from Rx buffer by application.