Microchip® Advanced Software Framework

att_server.h File Reference
#include <stdint.h>
#include "ble/att_db.h"
#include "btstack_defines.h"

Functions

int att_server_can_send_packet_now (hci_con_handle_t con_handle)
 
int att_server_indicate (hci_con_handle_t con_handle, uint16_t attribute_handle, uint8_t *value, uint16_t value_len)
 
void att_server_init (uint8_t const *db, att_read_callback_t read_callback, att_write_callback_t write_callback)
 
int att_server_notify (hci_con_handle_t con_handle, uint16_t attribute_handle, uint8_t *value, uint16_t value_len)
 
void att_server_register_can_send_now_callback (btstack_context_callback_registration_t *callback_registration, hci_con_handle_t con_handle)
 Request callback when sending is possible. More...
 
void att_server_register_packet_handler (btstack_packet_handler_t handler)
 
void att_server_request_can_send_now_event (hci_con_handle_t con_handle)
 Request emission of ATT_EVENT_CAN_SEND_NOW as soon as possible. More...
 

int att_server_can_send_packet_now ( hci_con_handle_t  con_handle)
void att_server_register_can_send_now_callback ( btstack_context_callback_registration_t callback_registration,
hci_con_handle_t  con_handle 
)

Request callback when sending is possible.

Note
callback might happend during call to this function
Parameters
callback_registrationto point to callback function and context information
con_handle

References att_dispatch_server_can_send_now(), att_dispatch_server_request_can_send_now_event(), btstack_linked_list_add_tail(), btstack_context_callback_registration_t::callback, con_handle, and btstack_context_callback_registration_t::context.

Referenced by battery_service_server_set_battery_value(), and hids_device_request_can_send_now_event().

void att_server_register_packet_handler ( btstack_packet_handler_t  handler)
void att_server_request_can_send_now_event ( hci_con_handle_t  con_handle)

Request emission of ATT_EVENT_CAN_SEND_NOW as soon as possible.

Note
ATT_EVENT_CAN_SEND_NOW might be emitted during call to this function so packet handler should be ready to handle it
Parameters
con_handle

References att_client_waiting_for_can_send, att_dispatch_server_request_can_send_now_event(), and log_debug.

Referenced by att_write_callback(), heartbeat_handler(), packet_handler(), process_data(), and tss_server_return_credit().