For example:

  ble_gap_is_adv
  ble_gap_is_disc
  ble_gap_is_connecting

You get the idea.

As a concrete example, I want the master to be scanning whenever it isn't
handling a connection. Ditto for slave/advertising. Some commands require
current op to be aborted (e.g. ble_gap_disc_cancel), and some events cause
the op to be aborted internally (e.g. incoming connection, or timed
advertising/scanning). This makes it cumbersome to track current state
accurately from the app code.

I am thinking something as simple as exposing ble_gap_master.op /
ble_gap_slave.op. With this, one could check current state and take
appropriate action as part of the event loop or timed callout.

Thoughts?

Reply via email to