PebbleOS
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
Responsiveness

Connection response time requests and connection parameter updates. More...

Data Structures

struct  pbl_bt_conn_params_update_req
 Connection parameter update request. More...
 

Typedefs

typedef void(* pbl_bt_responsiveness_granted_cb_t) (void)
 Called when the requested response time has been negotiated and granted.
 

Enumerations

enum  pbl_bt_consumer {
  PBL_BT_CONSUMER_NONE = 0 , PBL_BT_CONSUMER_APP , PBL_BT_CONSUMER_LE_PAIRING , PBL_BT_CONSUMER_LE_SERVICE_DISCOVERY ,
  PBL_BT_CONSUMER_MUSIC_SERVICE_INDEFINITE , PBL_BT_CONSUMER_MUSIC_SERVICE_MOMENTARY , PBL_BT_CONSUMER_PP_APP_FETCH , PBL_BT_CONSUMER_PP_APP_MESSAGE ,
  PBL_BT_CONSUMER_PP_AUDIO_ENDPOINT , PBL_BT_CONSUMER_PP_GET_BYTES , PBL_BT_CONSUMER_PP_LOG_DUMP , PBL_BT_CONSUMER_PP_PUT_BYTES ,
  PBL_BT_CONSUMER_PP_SCREENSHOT , PBL_BT_CONSUMER_PP_VOICE_ENDPOINT , PBL_BT_CONSUMER_PROMPT , PBL_BT_CONSUMER_TIMELINE_ACTION_MENU ,
  PBL_BT_CONSUMER_PRF , PBL_BT_CONSUMER_PPS_REMOTE_DEVICE , PBL_BT_CONSUMER_UNIT_TESTS , PBL_BT_CONSUMER_NUM
}
 Firmware modules that request a response time. More...
 
enum  pbl_bt_response_time_state {
  PBL_BT_RESPONSE_TIME_INVALID = -1 , PBL_BT_RESPONSE_TIME_MAX = 0 , PBL_BT_RESPONSE_TIME_MIDDLE , PBL_BT_RESPONSE_TIME_MIN ,
  PBL_BT_RESPONSE_TIME_NUM
}
 Connection response time. More...
 

Functions

bool pbl_bt_le_connection_parameter_update (const struct pbl_bt_device_internal *addr, const struct pbl_bt_conn_params_update_req *req)
 Request new connection parameters.
 

Minimum latency timeouts

Longest time, in seconds, each module may keep the connection in PBL_BT_RESPONSE_TIME_MIN.

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_AUDIO_SECS   (10)
 Audio.
 
#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_APP_FETCH_SECS   (5)
 App fetch.
 
#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_APP_MESSAGE_SECS   (10)
 App messages.
 
#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_CD_SECS   (10)
 Core dump transfer.
 
#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_PROTOCOL_RECV_SECS   (60)
 Pebble Protocol reception.
 
#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_PUT_BYTES_SECS   (60)
 Put bytes.
 
#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_SCREENSHOT_SECS   (5)
 Screenshots.
 
#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_TIMELINE_ACTION_MENU_SECS   (10)
 Timeline action menu.
 
#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_VOICE_SECS   (10)
 Voice.
 

Detailed Description

Connection response time requests and connection parameter updates.

Firmware modules request a response time as a consumer; the connection manager (comm/bt_conn_mgr.h) picks the fastest one requested and updates the connection parameters with pbl_bt_le_connection_parameter_update().


Data Structure Documentation

◆ pbl_bt_conn_params_update_req

struct pbl_bt_conn_params_update_req

Connection parameter update request.

Packed because it is serialized.

Data Fields
uint16_t interval_max_1_25ms Maximum connection interval in 1.25 ms units.
uint16_t interval_min_1_25ms Minimum connection interval in 1.25 ms units.
uint16_t slave_latency_events Peripheral latency in connection events.
uint16_t supervision_timeout_10ms Supervision timeout in 10 ms units.

Macro Definition Documentation

◆ PBL_BT_MIN_LATENCY_MODE_TIMEOUT_APP_FETCH_SECS

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_APP_FETCH_SECS   (5)

App fetch.

◆ PBL_BT_MIN_LATENCY_MODE_TIMEOUT_APP_MESSAGE_SECS

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_APP_MESSAGE_SECS   (10)

App messages.

◆ PBL_BT_MIN_LATENCY_MODE_TIMEOUT_AUDIO_SECS

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_AUDIO_SECS   (10)

Audio.

◆ PBL_BT_MIN_LATENCY_MODE_TIMEOUT_CD_SECS

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_CD_SECS   (10)

Core dump transfer.

◆ PBL_BT_MIN_LATENCY_MODE_TIMEOUT_PROTOCOL_RECV_SECS

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_PROTOCOL_RECV_SECS   (60)

Pebble Protocol reception.

◆ PBL_BT_MIN_LATENCY_MODE_TIMEOUT_PUT_BYTES_SECS

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_PUT_BYTES_SECS   (60)

Put bytes.

◆ PBL_BT_MIN_LATENCY_MODE_TIMEOUT_SCREENSHOT_SECS

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_SCREENSHOT_SECS   (5)

Screenshots.

◆ PBL_BT_MIN_LATENCY_MODE_TIMEOUT_TIMELINE_ACTION_MENU_SECS

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_TIMELINE_ACTION_MENU_SECS   (10)

Timeline action menu.

◆ PBL_BT_MIN_LATENCY_MODE_TIMEOUT_VOICE_SECS

#define PBL_BT_MIN_LATENCY_MODE_TIMEOUT_VOICE_SECS   (10)

Voice.

Typedef Documentation

◆ pbl_bt_responsiveness_granted_cb_t

typedef void(* pbl_bt_responsiveness_granted_cb_t) (void)

Called when the requested response time has been negotiated and granted.

Enumeration Type Documentation

◆ pbl_bt_consumer

Firmware modules that request a response time.

Each module enters and exits low latency states under its own consumer.

Enumerator
PBL_BT_CONSUMER_NONE 

No consumer.

PBL_BT_CONSUMER_APP 

Applications.

PBL_BT_CONSUMER_LE_PAIRING 

LE pairing.

PBL_BT_CONSUMER_LE_SERVICE_DISCOVERY 

LE GATT service discovery.

PBL_BT_CONSUMER_MUSIC_SERVICE_INDEFINITE 

Music service, until released.

PBL_BT_CONSUMER_MUSIC_SERVICE_MOMENTARY 

Music service, briefly.

PBL_BT_CONSUMER_PP_APP_FETCH 

Pebble Protocol app fetch.

PBL_BT_CONSUMER_PP_APP_MESSAGE 

Pebble Protocol app messages.

PBL_BT_CONSUMER_PP_AUDIO_ENDPOINT 

Pebble Protocol audio endpoint.

PBL_BT_CONSUMER_PP_GET_BYTES 

Pebble Protocol get bytes.

PBL_BT_CONSUMER_PP_LOG_DUMP 

Pebble Protocol log dump.

PBL_BT_CONSUMER_PP_PUT_BYTES 

Pebble Protocol put bytes.

PBL_BT_CONSUMER_PP_SCREENSHOT 

Pebble Protocol screenshot.

PBL_BT_CONSUMER_PP_VOICE_ENDPOINT 

Pebble Protocol voice endpoint.

PBL_BT_CONSUMER_PROMPT 

Prompt (debug console over Pebble Protocol).

PBL_BT_CONSUMER_TIMELINE_ACTION_MENU 

Timeline action menu.

PBL_BT_CONSUMER_PRF 

Recovery firmware.

PBL_BT_CONSUMER_PPS_REMOTE_DEVICE 

Remote device, through the Pebble Pairing Service.

PBL_BT_CONSUMER_UNIT_TESTS 

Unit tests.

PBL_BT_CONSUMER_NUM 

Number of consumers.

◆ pbl_bt_response_time_state

Connection response time.

Enumerator
PBL_BT_RESPONSE_TIME_INVALID 

Invalid.

PBL_BT_RESPONSE_TIME_MAX 

Slowest response, lowest throughput and power.

PBL_BT_RESPONSE_TIME_MIDDLE 

Intermediate response time.

PBL_BT_RESPONSE_TIME_MIN 

Fastest response, highest throughput and power.

PBL_BT_RESPONSE_TIME_NUM 

Number of response times.

Function Documentation

◆ pbl_bt_le_connection_parameter_update()

bool pbl_bt_le_connection_parameter_update ( const struct pbl_bt_device_internal *  addr,
const struct pbl_bt_conn_params_update_req *  req 
)

Request new connection parameters.

The outcome is reported through pbl_bt_handle_le_conn_params_update_event().

Parameters
addrThe peer.
reqRequested parameters.
Returns
true if the request was sent.