Initialization:
The softdevice is initialized as in the BLE UART example. The body of the ble_stack_init() function is identical to the BLE UART example.
SPI is initialized as in the SPI peripheral example, but I have gone over to writing the registers…