Go to the documentation of this file.
65 #include "custom_config.h"
72 #define THS_CONNECTION_MAX 10
73 #define THS_MAX_DATA_LEN 512
74 #define THS_SERVICE_UUID 0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
75 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
The data from the peer has been received.
uint16_t length
Length of received data.
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
BLE Connection Interval parameter.
@ THS_TOGGLE_STATE_ON
Sending data is enabled.
ths_evt_handler_t evt_handler
Throughput Service event handler which must be provided by the application to send and receive the da...
ths_evt_type_t
Throughput Service event type.
@ THS_TOGGLE_STATE_OFF
Sending data is disabled.
@ THS_SETTINGS_TYPE_MTU
MTU Size.
ths_evt_type_t evt_type
The THS event type.
@ THS_EVT_TOGGLE_SET
The toggle state has been set by the peer.
ths_transport_mode_t
Throughput data transport mode.
@ THS_SLAVE_NOTIFY_MODE
Only allow device notify.
ths_transport_mode_t transport_mode
The transport mode of a device.
@ THS_EVT_INVALID
Invalid THS event type.
@ THS_SETTINGS_TYPE_RANGING_PARAM
ths_settings_type_t
Throughput service settings types.
ths_settings_type_t setting_type
The THS parameter set type.
@ THS_MASTER_WRITE_MODE
Only allow peer writes.
@ THS_EVT_SETTINGS_CHANGED
The settings parameters, like MTU, PHY, have been changed by the peer.
uint8_t conn_idx
The index of the connection for the data transmission.
@ THS_SETTINGS_TYPE_PHY
Radio Phy mode, 1M, 2M, Encoded.
@ THS_DOUBLE_MODE
Allow device notify and peer writes at the same time.
Throughput Service event.
uint8_t * p_data
Pointer to the received data.
ths_transport_mode_t ths_transport_mode_get(void)
Get current transport mode of device.
uint16_t sdk_err_t
SDK API result type.
ths_toggle_state_t
Throughput toggle state of sending the data.
Throughput Service init stucture.
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
Connect Tx power.
@ THS_SETTINGS_TYPE_TRANS_MODE
Data transmission mode.
@ THS_EVT_DATA_SENT
The data from the application has been sent, and the service is ready to accept new data from the app...
void(* ths_evt_handler_t)(ths_evt_t *p_evt)
Throughput Service event handler type.
@ THS_SETTINGS_TYPE_PDU
PDU Size.