| Airoha M0 BLE API 1.0.5.4

Data Structures | Typedefs | Enumerations | Functions
bt.h

## Data Structures
struct | bt_init_evt_t
| Event structure for BT_MISC_EVENT_INITED. More...
struct | ble_misc_evt_t
| MISC event structure. More...
struct | bt_evt_t
| All event structure. More...

## Typedefs
typedef void(* | bt_event_handler) (bt_evt_t *)
| Event handler Event handler, passed in Bt_Init function.

## Enumerations
enum | bt_misc_event_id { BT_MISC_EVENT_INITED = BT_EVENT_MISC }
| MISC Event IDs. IDs that uniquely identify an event. More...

## Functions
void | BT_Init (bt_event_handler handler)
| Initialize BT. More...
void | BT_InitEx (bt_event_handler handler, void *cdata, uint32_t log_level)
| Initialize BT with controller specific data. More...
void | BT_InitEx2 (bt_event_handler handler, void *cdata[], uint8_t count, uint32_t log_level)
| Initialize BT with controller specific data. More...
void | BT_Loop (void)
| BT main Loop.
void | BT_Log_Enable (uint32_t log_level)
| BT log enable/disable. More...
uint32_t | BT_Pending_TxCnt (void)
| BT Pending TX Data Query how manay data (In bytes) is not send out.
void | BT_Pause_Tx (bool is_pause)
| Pause BT TX data transmit.

## BT_LOG_FLAGS [Defines]
Bitwise switch flag for BT Log on UART. Used in BT_Log_Enable.
#define | BT_LOG_NONE 0x00000000
#define | BT_LOG_HCI_CMD 0x00000001
| HCI command log.
#define | BT_LOG_HCI_EVT 0x00000002
| HCI event log.
#define | BT_LOG_HCI_TXDAT 0x00000004
| HCI TX data log.
#define | BT_LOG_HCI_RXDAT 0x00000008
| HCI RX data log.

## Detailed Description

### bt.h

bt.h provide BT API.

## Enumeration Type Documentation

## ◆ bt_misc_event_id

enum bt_misc_event_id

MISC Event IDs. IDs that uniquely identify an event.

Enumerator
BT_MISC_EVENT_INITED | Event for BT Initailized.

## Function Documentation

## ◆ BT_Init()

void BT_Init | ( | bt_event_handler | handler | ) |

Initialize BT.

Parameters

  handler | Global event handler

Note
  This function was deprecated. Please use BT_InitEx2.

## ◆ BT_InitEx()

void BT_InitEx | ( | bt_event_handler | handler,
|  | void * | cdata,
|  | uint32_t | log_level
| ) |  |

Initialize BT with controller specific data.

Parameters

  handler | Global event handler
  cdata | Pre-defined data for BT controller.
  log_level | Log level switch. BT_LOG_FLAGS

Note
  This function was deprecated. Please use BT_InitEx2.

## ◆ BT_InitEx2()

void BT_InitEx2 | ( | bt_event_handler | handler,
|  | void * | cdata[],
|  | uint8_t | count,
|  | uint32_t | log_level
| ) |  |

Initialize BT with controller specific data.

Parameters

  handler | Global event handler
  cdata | Pre-defined data for BT controller.
  count | Pre-define data count for BT controller.
  log_level | Log level switch. BT_LOG_FLAGS

## ◆ BT_Log_Enable()

void BT_Log_Enable | ( | uint32_t | log_level | ) |

BT log enable/disable.

Parameters

  log_level | Log level switch. BT_LOG_FLAGS