Hi,
I started with simple_peripheral on the CC2650LP, added a 6th characteristic which I'm able to write and read using nRF Connect. Then I pulled in the PWM_LED example, and got the red LED flashing at 0.5s rate. (thanks to this forum!) Now, I'm trying to use the 6th characteristic to write a global variable called ledEnable to enable/disable the LED flashing. Here is the result of a text search for ledEnable:
I declared ledEnable as volatile in simple_gatt_profile.c and as extern volatile in main.c. In the SimpleProfile_SetParameter function I assign the characteristic 6 value to led Enable and then I use ledEnable in SimpleProfile_GetParameter. This works i.e. I can write a value to char 6 and read it back. So I think this means that the value from BLE is being assigned to the ledEnable variable. The problem is that the value is not available in my redLED task in main.c as a live variable.
I was trying to avoid using interprocess communications to reduce latency, but I can't seem to make this simple approach work.
Any hints?
Thanks,
Jim