Go to the documentation of this file.
65 #include "custom_config.h"
72 #define THS_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
73 10 : CFG_MAX_CONNECTIONS)
74 #define THS_MAX_DATA_LEN 512
75 #define THS_SERVICE_UUID 0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
76 0x0A, 0x46, 0x44, 0xD3, 0x01, 0x03, 0xED, 0xA6
sdk_err_t ths_data_send(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
Send data to peer device.
@ THS_EVT_DATA_RECEIVED
Definition: ths.h:95
uint16_t length
Definition: ths.h:131
sdk_err_t ths_service_init(ths_init_t *p_ths_init)
Initialize a Throughput Service instance and add in the DB.
@ THS_SETTINGS_TYPE_CI
Definition: ths.h:111
@ THS_TOGGLE_STATE_ON
Definition: ths.h:105
ths_evt_handler_t evt_handler
Definition: ths.h:150
ths_evt_type_t
Throughput Service event type.
Definition: ths.h:93
@ THS_TOGGLE_STATE_OFF
Definition: ths.h:104
@ THS_SETTINGS_TYPE_MTU
Definition: ths.h:112
ths_evt_type_t evt_type
Definition: ths.h:127
@ THS_EVT_TOGGLE_SET
Definition: ths.h:98
ths_transport_mode_t
Throughput data transport mode.
Definition: ths.h:85
@ THS_SLAVE_NOTIFY_MODE
Definition: ths.h:86
ths_transport_mode_t transport_mode
Definition: ths.h:151
@ THS_EVT_INVALID
Definition: ths.h:94
ths_settings_type_t
Throughput service settings types.
Definition: ths.h:110
ths_settings_type_t setting_type
Definition: ths.h:128
@ THS_MASTER_WRITE_MODE
Definition: ths.h:87
@ THS_EVT_SETTINGS_CHANGED
Definition: ths.h:97
uint8_t conn_idx
Definition: ths.h:129
@ THS_SETTINGS_TYPE_PHY
Definition: ths.h:114
@ THS_DOUBLE_MODE
Definition: ths.h:88
Throughput Service event.
Definition: ths.h:126
uint8_t * p_data
Definition: ths.h:130
ths_transport_mode_t ths_transport_mode_get(void)
Get current transport mode of device.
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
ths_toggle_state_t
Throughput toggle state of sending the data.
Definition: ths.h:103
Throughput Service init stucture. This contains all option and data needed for initialization of the ...
Definition: ths.h:149
sdk_err_t ths_settings_notify(uint8_t conn_idx, uint8_t *p_settings, uint16_t length)
Notify the peer device of the change of settings.
@ THS_SETTINGS_TYPE_TX_POWER
Definition: ths.h:116
@ THS_SETTINGS_TYPE_TRANS_MODE
Definition: ths.h:115
@ THS_EVT_DATA_SENT
Definition: ths.h:96
void(* ths_evt_handler_t)(ths_evt_t *p_evt)
Throughput Service event handler type.
Definition: ths.h:140
@ THS_SETTINGS_TYPE_PDU
Definition: ths.h:113