All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
BluetoothConnectionService

Detailed Description

Function Documentation

bool bluetooth_connection_service_peek ( void  )

Query the bluetooth connection service for the current connection status.

Returns
true if connected, false otherwise
void bluetooth_connection_service_subscribe ( BluetoothConnectionHandler  handler)

Subscribe to the bluetooth event service. Once subscribed, the handler gets called on every bluetooth connection event.

Parameters
handlerA callback to be executed on connection event
void bluetooth_connection_service_unsubscribe ( void  )

Unsubscribe from the bluetooth event service. Once unsubscribed, the previously registered handler will no longer be called.

Typedef Documentation

typedef void(* BluetoothConnectionHandler)(bool connected)

Callback type for bluetooth connection events.

Parameters
connectedtrue on bluetooth connection, false on disconnection