MT2523 API Reference LinkIt SDK v4
This section defines the confirmation types and APIs to switch the power on and off. More...
This section defines the confirmation types and APIs to switch the power on and off.
The application layer can power on the Bluetooth if it is powered off and a stack memory is assigned.
|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. More...|
|This function powers off the Bluetooth. More...|
|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. More...|
|Define the power on or off events. |
|Define power on event parameter structure. |
This function is a static callback for the application to listen to the event.
Provide a user-defined callback.
|[in]||msg||is the callback message type.|
|[in]||status||is the status of the callback message.|
|[in]||buf||is the payload of the callback message.|
This function powers off the Bluetooth.
The SDK will not send disconnect requests to the existing connections during the power off operation. The application layer will receive BT_POWER_OFF_CNF after the Bluetooth is powered off.
This function powers on the Bluetooth.
The application layer receives BT_POWER_ON_CNF with bt_power_on_cnf_t after the Bluetooth is powered on. Make sure the memory is initialized, the Bluetooth task is created and Bluetooth is powered on before calling any other Bluetooth APIs.
|[in]||public_addr||is a pointer to a given public address (6 bytes). If public_addr is NULL, the controller will generate a public address and provide it to the user using BT_POWER_ON_CNF with bt_power_on_cnf_t. If public_addr is not NULL, the address in the BT_POWER_ON_CNF is same as public_addr. The given public address should not be [00-00-00-00-00-00].|
|[in]||random_addr||is a pointer to a given random address(6 bytes).|