Why does the soft device raise a SWI2 interrupt to indicate to the application that an event occurred? In the SDK, callbacks are implemented using function pointers. A function pointer is typically passed in to an initialization function and then later invoked when a callback is required. An example is app_timer which uses a app_timer_timeout_handler_t function pointer which is passed in to the app_timer_create function and then invoked when the time-out occurs. It seems to me that the same mechanism could be used to register BLE/system event handlers with the SDK.
Are there reasons why it is not possible to use function pointers to register handlers with the SD? Are there benefits to raising a SWI2 interrupts over the function pointer approach?
The only reason I ask is because I am curious.