Please look at the attachment of my code. Go to \nRF51_SDK_9.0.0_2e23562\examples\ble_peripheral\ble_app_template\pca10028\s130\arm5_no_packs in the SDK download and copy and paste the code that I have (after deleting the preexisting code).
I want to know the following:
-
What should I add for adding a characteristic that is writeable?
-
How do I add a handler for that characteristic, when it is written to?
-
In that handler function, or interrupt, how exactly do I switch to dfu mode. (I am specifically having trouble with definition of the BLE_DFU_APP_SUPPORT value. Because in order for the DFU code to work I think the BLE_DFU_APP_SUPPORT has to be defined as a preprocessor directive "#define ... " but it is not defined in the code( at least, I do not think).