Functions | |
sibles_hdl | sibles_register_svc (sibles_register_svc_t *svc) |
Register 16 bits GATT service. More... | |
sibles_hdl | sibles_register_svc_128 (sibles_register_svc_128_t *svc) |
Register 128 bits GATT service. More... | |
void | sibles_register_cbk (sibles_hdl hdl, sibles_get_cbk gcbk, sibles_set_cbk scbk) |
Register GATT service callback. More... | |
int | sibles_set_value (uint8_t conn_idx, sibles_value_t *value) |
Update service attribute cache. The content will be used as response to next remote get, get callback will not be called. More... | |
int | sibles_write_value (uint8_t conn_idx, sibles_value_t *value) |
Send new service attribute to remote using gatt notify. More... | |
int | sibles_write_value_with_rsp (uint8_t conn_idx, sibles_value_t *value) |
Send new service attribute to remote using gatt indicate. More... | |
void | sibles_stop_svc (sibles_hdl hdl) |
Stop GATT service. More... | |
int8_t | sibles_search_service (uint8_t conn_idx, uint8_t uuid_len, uint8_t *uuid) |
Search peer device's service via uuid. More... | |
uint16_t | sibles_register_remote_svc (uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl, sibles_remote_svc_cbk callback) |
Register callback for a specified service of peer device. More... | |
void | sibles_unregister_remote_svc (uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl, sibles_remote_svc_cbk callback) |
void | sibles_send_remote_svc_change_ind (uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl) |
void | sibles_deregister_remote_svc (uint16_t start_hdl, uint16_t end_hdl, sibles_remote_svc_cbk callback) |
De-register callback for a specified service of peer device, should be called when link disconnected. More... | |
int8_t | sibles_write_remote_value (uint16_t remote_handle, uint8_t conn_idx, sibles_write_remote_value_t *value) |
Write value to GATT server. More... | |
int8_t | sibles_read_remote_value (uint16_t remote_handle, uint8_t conn_idx, sibles_read_remote_value_req_t *value) |
Read value from GATT server. More... | |
uint8_t | sibles_exchange_mtu (uint8_t conn_idx) |
Exchange MTU size. More... | |
void | sifli_ble_enable (void) |
Enable sible BLE system. It will trigger ble_power_on(). | |
void | sibles_send_svc_changed_ind (uint8_t conn_idx, uint16_t start_handle, uint16_t end_handle) |
void | sibles_set_random_addr (uint8_t conn_idx, uint8_t *value) |
set static random addr type without reboot. More... | |
uint8_t | sibles_get_tx_pkts (void) |
uint8_t | sibles_get_gatt_handle (sibles_hdl svc_handle, uint8_t idx) |
uint8_t | sibles_get_gatt_handle_by_uuid (uint16_t attr_uuid) |
uint16_t | sibles_get_uuid_by_attr (uint8_t attr) |
sibles_hdl | sibles_get_sible_handle_and_index_by_attr (uint8_t attr, uint8_t *write_index) |
sible_types
void sibles_deregister_remote_svc | ( | uint16_t | start_hdl, |
uint16_t | end_hdl, | ||
sibles_remote_svc_cbk | callback | ||
) |
De-register callback for a specified service of peer device, should be called when link disconnected.
[in] | start_hdl | service start handle. |
[in] | end_hdl | service end handle. |
[in] | callback | received response or indication from GATT server. |
uint8_t sibles_exchange_mtu | ( | uint8_t | conn_idx | ) |
Exchange MTU size.
[in] | conn_idx | connection index. |
result. |
int8_t sibles_read_remote_value | ( | uint16_t | remote_handle, |
uint8_t | conn_idx, | ||
sibles_read_remote_value_req_t * | value | ||
) |
Read value from GATT server.
[in] | remote_handle | specified GATT handle. |
[in] | conn_idx | connection index. |
[in] | value | read req parameter. |
result. |
void sibles_register_cbk | ( | sibles_hdl | hdl, |
sibles_get_cbk | gcbk, | ||
sibles_set_cbk | scbk | ||
) |
Register GATT service callback.
[in] | hdl | Service handle. |
[in] | gcbk | Service attribute get callback. |
[in] | scbk | Service attribute set callback. |
uint16_t sibles_register_remote_svc | ( | uint8_t | conn_idx, |
uint16_t | start_hdl, | ||
uint16_t | end_hdl, | ||
sibles_remote_svc_cbk | callback | ||
) |
Register callback for a specified service of peer device.
[in] | conn_idx | connection index. |
[in] | start_hdl | service start handle. |
[in] | end_hdl | service end handle. |
[in] | callback | received response or indication from GATT server. |
result. |
sibles_hdl sibles_register_svc | ( | sibles_register_svc_t * | svc | ) |
Register 16 bits GATT service.
[in] | svc | service record for GATT. |
sibles_hdl | Service handle. |
sibles_hdl sibles_register_svc_128 | ( | sibles_register_svc_128_t * | svc | ) |
Register 128 bits GATT service.
[in] | svc | 128 bist service record. |
sibles_hdl | Service handle. |
int8_t sibles_search_service | ( | uint8_t | conn_idx, |
uint8_t | uuid_len, | ||
uint8_t * | uuid | ||
) |
Search peer device's service via uuid.
[in] | conn_idx | connection index. |
[in] | uuid_len | uuid length. |
[in] | uuid | service uuid. |
result. |
void sibles_set_random_addr | ( | uint8_t | conn_idx, |
uint8_t * | value | ||
) |
set static random addr type without reboot.
[in] | conn_idx | connection index. |
[in] | value | address and type. |
int sibles_set_value | ( | uint8_t | conn_idx, |
sibles_value_t * | value | ||
) |
Update service attribute cache. The content will be used as response to next remote get, get callback will not be called.
[in] | conn_idx | Connection index for the service. |
[in] | value | Attribute content buffer. |
void sibles_stop_svc | ( | sibles_hdl | hdl | ) |
Stop GATT service.
[in] | hdl | Service handle. |
int8_t sibles_write_remote_value | ( | uint16_t | remote_handle, |
uint8_t | conn_idx, | ||
sibles_write_remote_value_t * | value | ||
) |
Write value to GATT server.
[in] | remote_handle | specified GATT handle. |
[in] | conn_idx | connection index. |
[in] | value | write value. |
result. |
int sibles_write_value | ( | uint8_t | conn_idx, |
sibles_value_t * | value | ||
) |
Send new service attribute to remote using gatt notify.
[in] | conn_idx | Connection index for the service. |
[in] | value | Attribute content buffer. |
int sibles_write_value_with_rsp | ( | uint8_t | conn_idx, |
sibles_value_t * | value | ||
) |
Send new service attribute to remote using gatt indicate.
[in] | conn_idx | Connection index for the service. |
[in] | value | Attribute content buffer. |