drivers/nble: Convert RPC deserialization to use net_buf

The data is in a net_buf already so we can just pass this to the
deserialization code. The net_buf context and API helps simplify the
code quite a lot.

Change-Id: Iecb62d3151d229a09538ad652508f1eb9c6c3ffc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-02-12 14:24:41 +02:00
commit ed8c6b361f
3 changed files with 110 additions and 149 deletions

View file

@ -72,7 +72,7 @@ static void rx_fiber(void)
buf = nano_fifo_get(&rx_queue, TICKS_UNLIMITED);
BT_DBG("Got buf %p", buf);
rpc_deserialize(buf->data, buf->len);
rpc_deserialize(buf);
net_buf_unref(buf);
}