This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541: GATT_wRITE , GATT READ Functions - when to use GATT_bm_alloc

Part Number: CC2541
Other Parts Discussed in Thread: CC2640R2F

HI,

Working on a CC2541 based Central device with 3 connections.

So I've been trying to use GATT_ReadMultiCharValue()

I have now solved this, but nothing in the documentation really gave me guidance so I need to clarify operation.

I had originally used a global array for the CHARACTERISTIC HANDLES I wanted to read and just set the req.pHandles to it with current results from the request, but subsequently found this function only seemed to work if I used GATT_bm_alloc() to provide memory for the Handles.

Can anyone explain this operation?

I am also doing single reads using GATT_ReadCharValue(), and don't use the GATT_bm_alloc() for these.

Just need some clarity on what the stack expects here.

Best Regards


Rob