BLE Common interface. More...
Data Structures | |
| struct | ble_register_callback_t |
| .Structure of store register information. More... | |
| struct | bt_register_callback_t |
| struct | bd_addr_t |
| BD Address structure. More... | |
| struct | ble_power_on_t |
| struct | ble_dut_mode_t |
| struct | ble_dut_end_ind_t |
| Indicate end of test mode event. More... | |
| struct | ble_status_t |
| struct | bt_ns_test_mode_tx_para_t |
| Structure of parameter for tx command in non-signaling test mode. More... | |
| struct | bt_ns_test_mode_rx_para_t |
| Structure of parameter for rx command in non-signaling test mode. More... | |
| struct | bt_ns_test_mode_stop_test_para_t |
| Structure of parameter for stop response in non-signaling test mode. More... | |
| union | bt_ns_test_mode_cmd_para_t |
| union | bt_ns_test_mode_rsp_para_t |
| struct | bt_ns_test_mode_ctrl_cmd_t |
| struct | bt_ns_test_mode_ctrl_rsp_t |
Macros | |
| #define | BD_ADDR_LEN 6 |
| Macro that define BD Address length(values in bytes). | 3B | 1B | 2B | | LAP | UAP | NAP |. | |
| #define | SPACE1(x) __attribute__((section(x))) |
| Macro that declare variable in a specified section. | |
| #define | SIFLI_BLE_REGISTER(func, context, n) |
| Macro of sifli event register. More... | |
| #define | SIFLI_BT_REGISTER(func, context, n) |
| #define | BLE_EVENT_REGISTER(func, context) SIFLI_BLE_REGISTER(func, context, "2") |
| Macro of siflie ble event handler register. More... | |
| #define | BLE_EVENT_REGISTER_HIGH(func, context) SIFLI_BLE_REGISTER(func, context, "1") |
| #define | BLE_EVENT_REGISTER_LOW(func, context) SIFLI_BLE_REGISTER(func, context, "3") |
| #define | BT_EVENT_REGISTER(func, context) SIFLI_BT_REGISTER(func, context, "2") |
| #define | BT_EVENT_REGISTER_HIGH(func, context) SIFLI_BT_REGISTER(func, context, "1") |
| #define | BT_EVENT_REGISTER_LOW(func, context) SIFLI_BT_REGISTER(func, context, "3") |
| #define | BT_RESET_MASK_BLE (1 << 0) |
| #define | BT_RESET_MASK_BT (1 << 1) |
Typedefs | |
| typedef int(* | register_func_t) (uint16_t event_id, uint8_t *data, uint16_t len, uint32_t context) |
| Register function proto type of BLE_EVENT_REGISTER. | |
| typedef int(* | register_bt_func_t) (uint16_t type, uint16_t event_id, uint8_t *data, uint32_t context) |
| typedef ble_status_t | ble_test_rx_start_cnf_t |
| typedef ble_status_t | ble_test_tx_start_cnf_t |
Enumerations | |
| enum | ble_common_event_type_t { BLE_COMMON_TYPE = 0x0, BLE_HCI_TYPE = 0x10, BLE_GAP_TYPE = 0x20, BLE_SIBLE_TYPE = 0x60, BLE_NVDS_TYPE = 0x80, BLE_ANCS_TYPE = 0x90, BLE_TIP_TYPE = 0xA0, BLE_CONNECTION_MANAGER_TYPE = 0xB0, BLE_AMS_TYPE = 0xD0 } |
| enum | ble_common_event_t { BLE_POWER_ON_IND = BLE_COMMON_TYPE, BLE_POWER_ON_CNF, BLE_POWER_OFF_CNF, BLE_DUT_TX_START_CNF, BLE_DUT_RX_START_CNF, BLE_DUT_END_IND, BLE_TX_CONFIG_CNF, BT_NS_DUT_RSP } |
| Common ble event that notify user. More... | |
| enum | ble_power_off_type { BLE_OFF, BLE_SYSTEM_OFF } |
| BLE power off type. More... | |
| enum | bt_ns_test_operation_t { BT_TEST_OP_ENTER_TEST, BT_TEST_OP_EXIT_TEST, BT_TEST_OP_TX_TEST, BT_TEST_OP_RX_TEST, BT_TEST_OP_STOP_TEST } |
| BT test operation for non-signaling mode. More... | |
| enum | ble_common_update_type_t { BLE_UPDATE_NO_UPDATE, BLE_UPDATE_ONCE, BLE_UPDATE_ALWAYS } |
| BLE update type. More... | |
Functions | |
| uint8_t | ble_power_on (void) |
| Power on BLE module. More... | |
| uint8_t | ble_power_off (uint8_t pwroff_type) |
| Power off BLE module. More... | |
| uint8_t | ble_enter_dut_mode (ble_dut_mode_t *dut_ctrl) |
| Enter device firmware update mode. More... | |
| void | ble_event_publish (uint16_t event_id, void *data, uint16_t len) |
| Publish events to user that registered via BLE_EVENT_REGISTER. More... | |
| void | bt_event_publish (uint16_t type, uint16_t event_id, void *data) |
| Publish events to user that registered via #BT_EVENT_REGISTER. More... | |
| uint8_t | ble_get_public_address (bd_addr_t *addr) |
| Get public address. More... | |
| ble_common_update_type_t | ble_request_public_address (bd_addr_t *addr) |
| User implmentation function. Stack will call this function to update public address. More... | |
| int | bt_mac_addr_generate_via_uid (bd_addr_t *addr) |
| Get BT mac address from chip UID. More... | |
| uint8_t | bt_enter_no_signal_dut_mode (bt_ns_test_mode_ctrl_cmd_t *dut_ctrl) |
| uint8_t | bt_system_reset (void) |
| void | bt_system_mask_clear (uint8_t mask) |
| void | bt_stack_nvds_update (void) |
BLE Common interface.
| #define BLE_EVENT_REGISTER | ( | func, | |
| context | |||
| ) | SIFLI_BLE_REGISTER(func, context, "2") |
Macro of siflie ble event handler register.
| [in] | func | register function. |
| [in] | context | user data. |
| #define SIFLI_BLE_REGISTER | ( | func, | |
| context, | |||
| n | |||
| ) |
Macro of sifli event register.
| [in] | func | register function. |
| [in] | context | user data. |
| [in] | n | priority. |
| #define SIFLI_BT_REGISTER | ( | func, | |
| context, | |||
| n | |||
| ) |
| typedef ble_status_t ble_test_rx_start_cnf_t |
The struture of BLE_DUT_RX_START_CNF.
| typedef ble_status_t ble_test_tx_start_cnf_t |
The struture of BLE_DUT_TX_START_CNF.
| enum ble_common_event_t |
Common ble event that notify user.
| enum ble_power_off_type |
| uint8_t ble_enter_dut_mode | ( | ble_dut_mode_t * | dut_ctrl | ) |
Enter device firmware update mode.
| [in] | dut_ctrl | Device firmware update configuration. |
| 0 | if success, otherwise failed. |
| void ble_event_publish | ( | uint16_t | event_id, |
| void * | data, | ||
| uint16_t | len | ||
| ) |
Publish events to user that registered via BLE_EVENT_REGISTER.
| [in] | event_id | id to notify user. |
| [in] | data | Data asscoaited with event id. |
| [in] | len | Data len |
| uint8_t ble_get_public_address | ( | bd_addr_t * | addr | ) |
Get public address.
| [out] | addr | Public address. |
| 0 | if public address could get. |
| uint8_t ble_power_off | ( | uint8_t | pwroff_type | ) |
Power off BLE module.
| [in] | pwroff_type | Power off type, 0:turn off BLE MAC/BB only, 1: Turn off whole CPU. |
| 0 | if success, otherwise failed. |
| uint8_t ble_power_on | ( | void | ) |
Power on BLE module.
| 0 | if success, otherwise failed. |
| ble_common_update_type_t ble_request_public_address | ( | bd_addr_t * | addr | ) |
User implmentation function. Stack will call this function to update public address.
| [out] | addr | Public address |
| BLE_UPDATE_NO_UPDATE | No need to update. BLE_UPDATE_ONCE Only update if public address not existed. BLE_UPDATE_ALWAYS Always use this public address. |
| void bt_event_publish | ( | uint16_t | type, |
| uint16_t | event_id, | ||
| void * | data | ||
| ) |
Publish events to user that registered via #BT_EVENT_REGISTER.
| [in] | event_id | id to notify user. |
| [in] | data | Data asscoaited with event id. |
| [in] | len | Data len |
| int bt_mac_addr_generate_via_uid | ( | bd_addr_t * | addr | ) |
Get BT mac address from chip UID.
| [out] | generate | mac address |
| 0 | Get mac address successful. -1 Parameter is null pointer. -2 read UID failed. -3 UID is 0. |