ARMmbed / ble-nrf51822

Nordic stack and drivers for the mbed BLE_API
Other
46 stars 51 forks source link

nRF5xn::init don't verify if errors have occurred during btle_init #59

Closed pan- closed 8 years ago

pan- commented 8 years ago

See this at: https://github.com/ARMmbed/ble-nrf51822/blob/master/source/nRF5xn.cpp#L94 . The init process should check and report if something has gone wrong

rainierwolfcastle commented 8 years ago

ARM Internal Ref: IOTSFW-1168

andresag01 commented 8 years ago

@pan- @rgrover : It is easy to simply return BLE_ERROR_UNSPECIFIED when a call to ble_init() fails. However, this might not be the ideal solution. The main problem is that we do not have sufficient error codes to be more specific about the cause of the problem. Is it acceptable to return BLE_ERROR_UNSPECIFIED when there is a failed call to ble_init()? Should we are more error codes to ble/blecommon.h in BLE API?

pan- commented 8 years ago

What would you want to return ?

andresag01 commented 8 years ago

Submitted a pull request https://github.com/ARMmbed/ble/pull/155 to add another error code to the API