mirror of https://github.com/ARMmbed/mbed-os.git
error when there is no handler
parent
fa36ed02ee
commit
42e4290160
|
|
@ -64,6 +64,10 @@ static const GapScanningParams default_scan_params;
|
|||
static const mbed_error_status_t mixed_scan_api_error =
|
||||
MBED_MAKE_ERROR(MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_USE_INCOMPATIBLE_API);
|
||||
|
||||
static const mbed_error_status_t illegal_state_error =
|
||||
MBED_MAKE_ERROR(MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_ILLEGAL_STATE);
|
||||
|
||||
|
||||
/*
|
||||
* Return true if value is included in the range [lower_bound : higher_bound]
|
||||
*/
|
||||
|
|
@ -1792,6 +1796,8 @@ void GenericGap::on_connection_parameter_request(const pal::GapRemoteConnectionP
|
|||
supervision_timeout_t(e.supervision_timeout)
|
||||
)
|
||||
);
|
||||
} else {
|
||||
MBED_ERROR(illegal_state_error, "Event handler required if connection params are user handled");
|
||||
}
|
||||
} else {
|
||||
_pal_gap.accept_connection_parameter_request(
|
||||
|
|
|
|||
|
|
@ -792,6 +792,7 @@ typedef enum _mbed_error_code {
|
|||
MBED_DEFINE_SYSTEM_ERROR(AUTHENTICATION_FAILED, 69), /* 325 Authentication Failed */
|
||||
MBED_DEFINE_SYSTEM_ERROR(RBP_AUTHENTICATION_FAILED, 70), /* 326 Rollback Protection Authentication Failed */
|
||||
MBED_DEFINE_SYSTEM_ERROR(BLE_USE_INCOMPATIBLE_API, 71), /* 327 Concurrent use of incompatible versions of a BLE API */
|
||||
MBED_DEFINE_SYSTEM_ERROR(BLE_ILLEGAL_STATE, 72), /* 328 BLE stack entered illegal state */
|
||||
|
||||
//Everytime you add a new system error code, you must update
|
||||
//Error documentation under Handbook to capture the info on
|
||||
|
|
|
|||
Loading…
Reference in New Issue