nRF52832开发包

ret_code_t pm_register ( pm_evt_handler_t  event_handler )  

Function for registering an event handler with the Peer Manager.

Parameters
[in] event_handler Callback for events from the Peer Manager module. event_handler is called for every event that the Peer Manager sends after this function is called.
Return values
NRF_SUCCESS If initialization was successful.
NRF_ERROR_NULL If event_handler was NULL.
NRF_ERROR_NO_MEM If no more registrations can happen.
NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
ret_code_t pm_sec_params_set ( ble_gap_sec_params_t *  p_sec_params )  

Function for providing pairing and bonding parameters to use for pairing procedures.

Until this function is called, all bonding procedures that are initiated by the peer are rejected.

This function can be called multiple times with different parameters, even with NULL as p_sec_params, in which case the Peer Manager starts rejecting all procedures again.

Parameters
[in] p_sec_params Security parameters to be used for subsequent security procedures.
Return values
NRF_SUCCESS If the parameters were set successfully.
NRF_ERROR_INVALID_PARAM If the combination of parameters is invalid.
NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
NRF_ERROR_INTERNAL If an internal error occurred.

你可能感兴趣的:(BLE__nRF52832)