#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "co_existence.h"
#include "btstack.h"
#include "ble/gatt-service/battery_service_server.h"
Macros | |
#define | __BTSTACK_FILE__ "le_counter.c" |
#define | HEARTBEAT_PERIOD_MS 1000 |
Functions | |
static uint16_t | att_read_callback (hci_con_handle_t con_handle, uint16_t att_handle, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
static int | att_write_callback (hci_con_handle_t con_handle, uint16_t att_handle, uint16_t transaction_mode, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
static void | beat (void) |
int | btstack_main (void) |
static void | heartbeat_handler (struct btstack_timer_source *ts) |
static void | le_counter_setup (void) |
static void | packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size) |
Variables | |
const uint8_t | adv_data [] |
const uint8_t | adv_data_len = sizeof(adv_data) |
static uint8_t | battery = 100 |
static hci_con_handle_t | con_handle |
static int | counter = 0 |
static char | counter_string [30] |
static int | counter_string_len |
static btstack_packet_callback_registration_t | hci_event_callback_registration |
static btstack_timer_source_t | heartbeat |
static int | le_notification_enabled |
#define __BTSTACK_FILE__ "le_counter.c" |
#define HEARTBEAT_PERIOD_MS 1000 |
Referenced by heartbeat_handler(), and le_counter_setup().
|
static |
References ATT_CHARACTERISTIC_0000FF11_0000_1000_8000_00805F9B34FB_01_VALUE_HANDLE, att_read_callback_handle_blob(), counter_string, and UNUSED.
Referenced by le_counter_setup().
|
static |
|
static |
References counter, counter_string, and counter_string_len.
Referenced by heartbeat_handler(), and le_counter_setup().
int btstack_main | ( | void | ) |
Referenced by bt_app_init().
|
static |
|
static |
References adv_data, adv_data_len, att_read_callback(), att_server_init(), att_server_register_packet_handler(), att_write_callback(), battery, battery_service_server_init(), beat(), btstack_run_loop_add_timer(), btstack_run_loop_set_timer(), btstack_packet_callback_registration_t::callback, gap_advertisements_enable(), gap_advertisements_set_data(), gap_advertisements_set_params(), hci_add_event_handler(), heartbeat_handler(), HEARTBEAT_PERIOD_MS, l2cap_init(), le_device_db_init(), packet_handler(), btstack_timer_source::process, profile_data, and sm_init().
Referenced by btstack_main().
|
static |
References ATT_CHARACTERISTIC_0000FF11_0000_1000_8000_00805F9B34FB_01_VALUE_HANDLE, ATT_EVENT_CAN_SEND_NOW, att_server_notify(), con_handle, counter_string, counter_string_len, HCI_EVENT_DISCONNECTION_COMPLETE, HCI_EVENT_PACKET, hci_event_packet_get_type(), le_notification_enabled, and UNUSED.
Referenced by le_counter_setup().
const uint8_t adv_data[] |
Referenced by le_counter_setup().
const uint8_t adv_data_len = sizeof(adv_data) |
Referenced by le_counter_setup(), and tss_start_advertising().
|
static |
Referenced by heartbeat_handler(), and le_counter_setup().
|
static |
Referenced by att_copy_value(), att_event_packet_handler(), att_handle_value_indication_timeout(), att_server_handle_can_send_now(), att_server_register_can_send_now_callback(), att_update_value_len(), att_write_callback(), battery_service_can_send_now(), battery_service_read_callback(), gatt_client_hci_event_packet_handler(), gatt_client_listen_for_characteristic_value_updates(), hci_send_acl_packet_buffer(), heartbeat_handler(), hids_device_can_send_now(), hids_device_request_can_send_now_event(), packet_handler(), provide_context_for_conn_handle(), and sm_event_packet_handler().
|
static |
Referenced by beat(), btstack_linked_list_count(), and le_device_db_count().
|
static |
Referenced by att_read_callback(), beat(), and packet_handler().
|
static |
Referenced by beat(), and packet_handler().
|
static |
|
static |
|
static |
Referenced by att_write_callback(), heartbeat_handler(), and packet_handler().