#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "malloc.h"
#include "ble_transparent.h"
#include "btstack.h"
Functions | |
void | app_process_incomming_packet (void) |
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) |
int | btstack_main (void) |
This function is called after initialization of HCI transport. More... | |
static void | packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size) |
void | process_data (void) |
static void | push_into_receive_buffer (uint8_t len, uint8_t *buf) |
void | tss_app_initialize (void) |
void | tss_app_setup (void) |
static uint16_t | tss_server_return_credit (uint8_t credit) |
void | tss_start_advertising (void) |
Variables | |
const uint8_t | adv_data_len = sizeof(tss_adv_data) |
static App_List | appList |
static btstack_packet_callback_registration_t | hci_event_callback_registration |
static Handle_List | localHandleList |
static Packet_Buffer | PacketIn [MAX_PACKET_BUFFER_LIST] |
uint8_t | payload_data [5] |
static tss_state_t | state = TSS_IDLE |
const uint8_t | tss_adv_data [] |
void app_process_incomming_packet | ( | void | ) |
References process_data().
Referenced by push_into_receive_buffer().
|
static |
References UNUSED.
Referenced by tss_app_setup().
|
static |
References APP_STATE_LE_CONNECTED, APP_STATE_LE_OPEN, App_List::appState, CREDIT_BASED_FLOW_CONTROL_ENABLED, App_List::creditBasedEnable, GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_NOTIFICATION, App_List::inUsedNum, little_endian_read_16(), MAX_PACKET_BUFFER_LIST, NULL, push_into_receive_buffer(), TR_READ_MTU_SIZE_AND_ENABLE_CREDIT_CTRL, Handle_List::transCtrl, Handle_List::transRx, tss_server_return_credit(), Handle_List::txCCCD, and UNUSED.
Referenced by tss_app_setup().
int btstack_main | ( | void | ) |
This function is called after initialization of HCI transport.
References hci_power_control(), HCI_POWER_ON, and le_counter_setup().
|
static |
References APP_STATE_LE_CONNECTED, APP_STATE_LE_OPEN, App_List::appState, ATT_EVENT_CAN_SEND_NOW, ATT_EVENT_MTU_EXCHANGE_COMPLETE, att_server_notify(), App_List::attMtu, BLE_GAP_ROLE_SLAVE, App_List::connHandle, App_List::credit, CREDIT_BASED_FLOW_CONTROL_ENABLED, App_List::creditBasedEnable, HCI_EVENT_DISCONNECTION_COMPLETE, HCI_EVENT_LE_META, hci_event_le_meta_get_subevent_code(), HCI_EVENT_PACKET, hci_event_packet_get_type(), HCI_SUBEVENT_LE_CONNECTION_COMPLETE, hci_subevent_le_connection_complete_get_connection_handle(), hci_subevent_le_connection_complete_get_role(), App_List::inReadIndex, App_List::inUsedNum, Packet_Buffer::length, log_info, MAX_PACKET_BUFFER_LIST, Packet_Buffer::packet, payload_data, process_data(), App_List::role, state, Handle_List::transCtrl, Handle_List::transTx, tss_app_initialize(), TSS_IDLE, TSS_RES_SUCCESS, TSS_RETURN_CREDIT_S_TO_C, TSS_RETURN_DATA_S_TO_C, tss_server_return_credit(), and UNUSED.
Referenced by tss_app_setup().
void process_data | ( | void | ) |
References att_server_request_can_send_now_event(), BLE_GAP_ROLE_SLAVE, App_List::connHandle, App_List::role, state, and TSS_RETURN_DATA_S_TO_C.
Referenced by app_process_incomming_packet(), and packet_handler().
|
static |
References app_process_incomming_packet(), App_List::inUsedNum, App_List::inWriteIndex, Packet_Buffer::length, MAX_PACKET_BUFFER_LIST, and Packet_Buffer::packet.
Referenced by att_write_callback().
void tss_app_initialize | ( | void | ) |
void tss_app_setup | ( | void | ) |
References ATT_CHARACTERISTIC_CONTROL_POINT_CHARATERISITC_CCD_VALUE_HANDLE, ATT_CHARACTERISTIC_CONTROL_POINT_CHARATERISITC_VALUE_HANDLE, ATT_CHARACTERISTIC_RX_CHARATERISITC_VALUE_HANDLE, ATT_CHARACTERISTIC_TX_CHARATERISITC_CCD_VALUE_HANDLE, ATT_CHARACTERISTIC_TX_CHARATERISITC_VALUE_HANDLE, att_read_callback(), att_server_init(), att_server_register_packet_handler(), att_write_callback(), btstack_packet_callback_registration_t::callback, Handle_List::ctrlCCCD, hci_add_event_handler(), l2cap_init(), le_device_db_init(), packet_handler(), profile_data, sm_init(), Handle_List::transCtrl, Handle_List::transRx, Handle_List::transTx, tss_app_initialize(), and Handle_List::txCCCD.
|
static |
void tss_start_advertising | ( | void | ) |
References adv_data_len, gap_advertisements_enable(), gap_advertisements_set_data(), gap_advertisements_set_params(), and tss_adv_data.
Referenced by tss_app_initialize().
const uint8_t adv_data_len = sizeof(tss_adv_data) |
|
static |
|
static |
|
static |
|
static |
uint8_t payload_data[5] |
|
static |
const uint8_t tss_adv_data[] |
Referenced by tss_start_advertising().